Forum Python

Please or S’enregistrer to create posts and topics.

python Tkinter error

Exception in Tkinter callback
Traceback (most recent call last):
File "C:Program FilesPython310libtkinter__init__.py", line 1921, in __call__
return self.func(*args)
File "c:UsersGothamDesktopdetectiongui1.py", line 67, in
my_button = tb.Button(text="Upload", bootstyle="primary, outline", command=lambda: execute_engine(file_path))
File "c:UsersGothamDesktopdetectiongui1.py", line 30, in execute_engine
result = subprocess.run(["C:./Users/Gotham/Desktop/detection/engine.exe", file_path], stdout=subprocess.PIPE)
File "C:Program FilesPython310libsubprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "C:Program FilesPython310libsubprocess.py", line 969, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:Program FilesPython310libsubprocess.py", line 1438, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

Le code tente d'exécuter un exécutable Windows inexistant.
Vérifiez votre code.
Si ce n'est pas votre code, il s'agit peut-être d'une bibliothèque que vous utilisez ou l'installation de Python présente des problèmes.