rlvaugh / Impractical_Python_Projects

Code & supporting files for chapters in book
412 stars 273 forks source link

Monty Hall Game Issue #14

Open 1503Deimos opened 3 years ago

1503Deimos commented 3 years ago

Hi there,

Ive had fun running through this book. Already have Real World Python and cant wait to dive into it also...

Unfortunately with the Monty Hall Game exercise, I keep getting the same error. Ive copy and pasted your version to make sure I wasnt missing a typebo or something. All files were downloaded and in the same folder as the code for the game. Im using Spyder IDE (via Anaconda) and Mac OS.

error reads: runfile('/Users/+++++/Monty Hall Game/monty_hall_gui.py', wdir='/Users/+++++/PythonPractice/Monty Hall Game') Traceback (most recent call last):

File "/Users/+++++/Monty Hall Game/monty_hall_gui.py", line 172, in game = Game(root)

File "/Users/+++++/PythonPractice/Monty Hall Game/monty_hall_gui.py", line 26, in init self.create_widgets()

File "/Users/+++++/PythonPractice/Monty Hall Game/monty_hall_gui.py", line 32, in create_widgets self.photo_lbl = tk.Label(self.parent, image=img,

File "/opt/anaconda3/lib/python3.8/tkinter/init.py", line 3143, in init Widget.init(self, master, 'label', cnf, kw)

File "/opt/anaconda3/lib/python3.8/tkinter/init.py", line 2567, in init self.tk.call(

TclError: image "pyimage6" doesn't exist

Any help is greatly appreciated. Thanks for the good read!!

rlvaugh commented 3 years ago

Sorry you are having trouble. Have you tried this: https://stackoverflow.com/questions/24274072/tkinter-pyimage-doesnt-exist or this: https://stackoverflow.com/questions/54243761/tkinter-tclerror-image-pyimage-doesnt-exist

1503Deimos commented 3 years ago

Wow...all I had to do was restart the kernel. Spent like 3 hours the other night googling everything. Thanks!

rlvaugh commented 3 years ago

Great!