I'm using raspberry pi4 with ssh connection, and I have the latest python 3.11.2 and latest thonny 4.1.4. I downloaded thonny through the terminal and tried to activating it using typing "thonny" though it showed this error message. I tried searching for these errors and couldn't understand what was wrong. Any help will be very welcomed thank you
20:08:57.165 [MainThread] INFO thonny: Thonny version: 4.1.4
20:08:57.166 [MainThread] INFO thonny: cwd: /home/dolev
20:08:57.166 [MainThread] INFO thonny: original argv: ['/usr/bin/python3', '/usr/bin/thonny']
20:08:57.166 [MainThread] INFO thonny: sys.executable: /usr/bin/python3
20:08:57.166 [MainThread] INFO thonny: sys.argv: ['/usr/bin/thonny']
20:08:57.166 [MainThread] INFO thonny: sys.path: ['/usr/bin', '/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '/usr/local/lib/python3.11/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.11/dist-packages']
20:08:57.166 [MainThread] INFO thonny: sys.flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0, dev_mode=False, utf8_mode=0, warn_default_encoding=0, safe_path=False, int_max_str_digits=-1)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/thonny/__init__.py", line 266, in launch
_delegate_to_existing_instance(sys.argv[1:])
File "/usr/lib/python3/dist-packages/thonny/__init__.py", line 353, in _delegate_to_existing_instance
sock, secret = _create_client_socket()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/thonny/__init__.py", line 396, in _create_client_socket
client_socket.connect(get_ipc_file_path())
ConnectionRefusedError: [Errno 111] Connection refused
20:08:57.265 [MainThread] INFO thonny.workbench: Starting Workbench
ERROR:root:Internal launch or mainloop error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/thonny/__init__.py", line 279, in launch
bench = workbench.Workbench()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/thonny/workbench.py", line 132, in __init__
tk.Tk.__init__(self, className="Thonny")
File "/usr/lib/python3.11/tkinter/__init__.py", line 2326, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: no display name and no $DISPLAY environment variable
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/thonny/__init__.py", line 279, in launch
bench = workbench.Workbench()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/thonny/workbench.py", line 132, in __init__
tk.Tk.__init__(self, className="Thonny")
File "/usr/lib/python3.11/tkinter/__init__.py", line 2326, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: no display name and no $DISPLAY environment variable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/thonny", line 33, in <module>
sys.exit(load_entry_point('thonny==4.1.4', 'gui_scripts', 'thonny')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/thonny/__init__.py", line 291, in launch
dlg = ui_utils.LongTextDialog("Internal error", traceback.format_exc())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/thonny/ui_utils.py", line 1858, in __init__
super().__init__(master=parent)
File "/usr/lib/python3/dist-packages/thonny/ui_utils.py", line 37, in __init__
assert master
AssertionError
Thonny doesn't 'crash.' It exits from a situation it cannot deal with and issues an informative error message.
Like any other application with a graphical interface - compare it with mousepad or pcmanfm - Thonny cannot usefully be run over a character-by-character command line interface such as that provided by ssh.
Consider using an alternative form of remote access such as VNC.
Statistics: Posted by B.Goode — Tue Apr 30, 2024 5:54 pm