Bonjour,

je veux importer des images dans un canvas j'ai importé tkinter en entier mais quand je fais
>>> photo=PhotoImage(file='garou.gif')
j'ai droit à l'erreur
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python25\lib\lib-tk\Tkinter.py", line 3270, in __init__
Image.__init__(self, 'photo', name, cnf, master, **kw)
File "C:\Python25\lib\lib-tk\Tkinter.py", line 3211, in __init__
raise RuntimeError, 'Too early to create image'
RuntimeError: Too early to create image


Je ne vois pas pourquoi ça ne marche pas, quelqu'un peut m'aider?