Last night I took the advice of a DaniWeb member and looked at some posted Python code; this code was based around a card-type game and involved creating a GIF deck, shuffling, then displaying it. My original question had to do with using a Python dict for my GIF images.
I downloaded the code and attempted to run it. The problem I keep getting, I'm sure, is not of a Python nature, but a programming problem in general.
Each time I run the code I get this:
C:/Python24/pythonw.exe -u "C:/Documents and Settings/RockStar/Desktop/Python/drpython-161/LLCool_J.py"
Traceback (most recent call last):
File "C:/Documents and Settings/RockStar/Desktop/Python/drpython-161/LLCool_J.py", line 61, in ?
photo1 = PhotoImage(file=image_dir+"C2.gif")
File "C:\Python24\lib\lib-tk\Tkinter.py", line 3203, in __init__
Image.__init__(self, 'photo', name, cnf, master, **kw)
File "C:\Python24\lib\lib-tk\Tkinter.py", line 3159, in __init__
self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't open "C:\Documents and Settings\RockStar\Desktop\Python\drpython-161\Cards_gifC2.gif": no such file or directory
I have these GIF images in the folder with my other Python files; the I tried putting them in a seperate file within this same Python folder. I change the code on every folder file change. I simply keep getting this error.
Has anyone dealt with this particular problem. It seems that it would be easy to solve but I am not finding the right solution.
** Also, does anyone know of a relevant Python error code source (similar to MSDN) that would describe in-depth what the thrown error means and the potential fixes.
Thank-you in advance,
sharky_machine