'Python Image Library and Tkinter Clashing

I have an issue where PIL and Tkinter are not working together in the same program.

Basically, I tried to run my program and when it was on the line 'image.open()' it thought I was trying to call tkinter's image.open function and not PIL's because both Tk and PIL have the same 'image.' functions.

Mainly what I want to know is if there is a way to restrict tkinter from accessing a part of my code.



Solution 1:[1]

As it turns out this was actually not happening. I just had to change the image mode for it to work.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 spiceinajar