Tkinter library not recognized by Pycharm

Asked

Viewed 297 times

-1

I am importing the Tkinter library into Pycharm, but Pycharm is not recognizing its functionality, not running and showing error.

I attached the image of the error presented for aid.

foto do script que esta dando erro

1 answer

3

Your flame file tkinter.py.

When you do from tkinter import *, you will import all objects from your own archive. In order of priority, the interpreter will search for the module first in the project directory.

How your file does not define the class Tk, the undefined class error is launched.

To avoid these problems, avoid naming your files with Python module names.

  • Thank you very much!!! I did not know that this could give conflict, good living and learning and thank you dnv !!!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.