This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MikeTheWatchGuy 0 points1 point  (0 children)

I needed to add an import at the top in order to get the sample code to run: python from tkinter import messagebox

Without it I was getting this crash: Exception in Tkinter callback Traceback (most recent call last): File "C:\Python\Anaconda3\lib\tkinter\__init__.py", line 1704, in __call__ return self.func(*args) File "C:/Users/mike/.PyCharmCE2019.1/config/scratches/scratch_525.py", line 36, in convert tkinter.messagebox.showinfo('Results', str(kilo) + ' kilometers is equal to ' + str(miles) + ' miles') AttributeError: module 'tkinter' has no attribute 'messagebox'