Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python error
#1
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\tkinter\__init__.py", line 1921, in __call__
return self.func(*args)
File "c:\Users\Gotham\Desktop\detection\gui1.py", line 67, in <lambda>
my_button = tb.Button(text="Upload", bootstyle="primary, outline", command=lambda: execute_engine(file_path))
File "c:\Users\Gotham\Desktop\detection\gui1.py", line 30, in execute_engine
result = subprocess.run(["C:./Users/Gotham/Desktop/detection/engine.exe", file_path], stdout=subprocess.PIPE)
File "C:\Program Files\Python310\lib\subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Program Files\Python310\lib\subprocess.py", line 969, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\Python310\lib\subprocess.py", line 1438, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
Reply
#2
Error:
FileNotFoundError: [WinError 2] The system cannot find the file specified
The code tries to run a non-existing Windows executable.
Check your code.

If it's not your code, then it's maybe a library you are using or the Python installation has some issues.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020