Ask coding questions

← Back to all posts
tcl error
Doraemon420 (0)

runfile('C:/Users/OS/Desktop/Shapla Text Editor/shapla.py', wdir='C:/Users/OS/Desktop/Shapla Text Editor')
Traceback (most recent call last):

File "<ipython-input-5-6b9db11c188b>", line 1, in <module>
runfile('C:/Users/OS/Desktop/Shapla Text Editor/shapla.py', wdir='C:/Users/OS/Desktop/Shapla Text Editor')

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile
execfile(filename, namespace)

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/OS/Desktop/Shapla Text Editor/shapla.py", line 140, in <module>
view.add_command(label='Tools bar', image=tool_bar, compound=tk.LEFT)

File "C:\ProgramData\Anaconda3\lib\tkinter__init__.py", line 2887, in add_command
self.add('command', cnf or kw)

File "C:\ProgramData\Anaconda3\lib\tkinter__init__.py", line 2878, in add
self._options(cnf, kw))

TclError: image ".!label" doesn't exist


why this is showing tcl error and how to fix?

Commentshotnewtop
malvoliothegood (255)

The following is the most relevant error I think. Are you trying to put an image on your label? Does the image exist? Is the path to it correct?
TclError: image ".!label" doesn't exist

Doraemon420 (0)

@malvoliothegood Thanks for the reply and I have been solved the problem