import _tkinter # If this fails your Python may not be configured for Tk
Got this mysterious error while deploying my frappe app in production. Was wondering why the hell is tkinter coming up, as it has no place on the app code. Then found this even mysterious line in MY code:
from idlelib.browser import file_open
Wondering where it came from, as I never typed it in. The culprit was Auto import feature of the editor in Pycharm. Typing file_o shows an autocomplete menu, and pressing tab / enter to complete using it results in the above import line being added to the top of the file, least where one is able to easily notice.I have turned off Auto Import in the IDE now. Did you also face such issue? Drop a comment...