weixin_39605414 2020-11-21 16:47
浏览 0

Back-end assertion error while debugging

Original report by Ron Aronica (Bitbucket: ArkansasProgrammer ).

I was debugging a small program and received the following error. I had just started the debugger and just hit Ctrl-F8. The trace was


PROBLEM WITH THONNY'S BACK-END:

Traceback (most recent call last):
  File "c:\users\ron\appdata\local\programs\python\python37\lib\site-packages\thonny\backend.py", line 1136, in execute_source
    root = self._prepare_ast(source, filename, mode)
  File "c:\users\ron\appdata\local\programs\python\python37\lib\site-packages\thonny\backend.py", line 1467, in _prepare_ast
    self._tag_nodes(root)
  File "c:\users\ron\appdata\local\programs\python\python37\lib\site-packages\thonny\backend.py", line 2036, in _tag_nodes
    last_child = ast_utils.get_last_child(node)
  File "c:\users\ron\appdata\local\programs\python\python37\lib\site-packages\thonny\ast_utils.py", line 155, in get_last_child
    and hasattr(node.slice, "step")
AssertionError

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

  • 写回答

7条回答 默认 最新

  • weixin_39605414 2020-11-21 16:47
    关注

    Original comment by Morne van Huyssteen (Bitbucket: mornevh GitHub: mornevh ).

    Same issue. The python code executes as expected. When clicking on "Debug current script (nicer) (Ctrl+F5)". It gives the same issue. Thonny v3.0.8 for Windows 10 (64-bit)

    
    PROBLEM WITH THONNY'S BACK-END:
    
    Traceback (most recent call last):
      File "C:\Users\Morne van Huyssteen\AppData\Local\Programs\Thonny\lib\site-packages\thonny\backend.py", line 1136, in execute_source
        root = self._prepare_ast(source, filename, mode)
      File "C:\Users\Morne van Huyssteen\AppData\Local\Programs\Thonny\lib\site-packages\thonny\backend.py", line 1467, in _prepare_ast
        self._tag_nodes(root)
      File "C:\Users\Morne van Huyssteen\AppData\Local\Programs\Thonny\lib\site-packages\thonny\backend.py", line 2036, in _tag_nodes
        last_child = ast_utils.get_last_child(node)
      File "C:\Users\Morne van Huyssteen\AppData\Local\Programs\Thonny\lib\site-packages\thonny\ast_utils.py", line 155, in get_last_child
        and hasattr(node.slice, "step")
    AssertionError
    
    评论

报告相同问题?