weixin_39605414 2020-11-20 23:28
浏览 0

Thonny loads its own code in the editor

Original report by Anonymous.

I just tried the new version 3.01 on my machine (64 bit Windows 10)

On starting Thonny I get a couple of error messages (see below). I have installed into a fresh empty directory.

I have worked for a while with the last beta version which worked rather perfect.


Traceback (most recent call last):
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\tkinter\__init__.py", line 1705, in __call__
    return self.func(*args)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\tkinter\__init__.py", line 749, in callit
    func(*args)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\site-packages\thonny\workbench.py", line 1855, in _poll_socket_requests
    self.get_editor_notebook().show_file(filename)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\site-packages\thonny\code.py", line 672, in show_file
    editor = self.get_editor(filename, True)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\site-packages\thonny\code.py", line 710, in get_editor
    return self._open_file(filename)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\site-packages\thonny\code.py", line 698, in _open_file
    editor = Editor(self, filename)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\site-packages\thonny\code.py", line 56, in __init__
    self._load_file(filename)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\site-packages\thonny\code.py", line 157, in _load_file
    with tokenize.open(filename) as fp:  # TODO: support also text files
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\tokenize.py", line 447, in open
    buffer = _builtin_open(filename, 'rb')
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Baruch\\AppData\\Local\\Programs\\Thonny\\lib\\site-packages'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\tkinter\__init__.py", line 1705, in __call__
    return self.func(*args)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\tkinter\__init__.py", line 749, in callit
    func(*args)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\site-packages\thonny\workbench.py", line 1855, in _poll_socket_requests
    self.get_editor_notebook().show_file(filename)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\site-packages\thonny\code.py", line 672, in show_file
    editor = self.get_editor(filename, True)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\site-packages\thonny\code.py", line 710, in get_editor
    return self._open_file(filename)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\site-packages\thonny\code.py", line 698, in _open_file
    editor = Editor(self, filename)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\site-packages\thonny\code.py", line 56, in __init__
    self._load_file(filename)
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\site-packages\thonny\code.py", line 157, in _load_file
    with tokenize.open(filename) as fp:  # TODO: support also text files
  File "C:\Users\Baruch\AppData\Local\Programs\Thonny\lib\tokenize.py", line 447, in open
    buffer = _builtin_open(filename, 'rb')
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Baruch\\AppData\\Local\\Programs\\Thonny\\lib\\site-packages'

该提问来源于开源项目:thonny/thonny

  • 写回答

18条回答 默认 最新

  • weixin_39605414 2020-11-20 23:28
    关注

    It looks like somehow the directory of thonny package ends up as command line argument to Thonny program.

    I'll see if I can replicate this.

    评论

报告相同问题?