简体   繁体   English

Thonny py5-mode 运行代码时出错

[英]Thonny py5-mode Error when running a code

I just tried to use py5 in thonny, but everytime i have the py5 mode on and try to run a code i get a bunch of error messeges, i dont really know what they mean so maybe somebody can help me out?我只是尝试在 thonny 中使用 py5,但每次我打开 py5 模式并尝试运行代码时,我都会收到一堆错误消息,我真的不知道它们是什么意思,所以也许有人可以帮助我? thanks in advance提前致谢

This is the error im always getting这是我总是得到的错误

Traceback (most recent call last):
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\py5_tools\tools\run_sketch.py", line 52, in <module>
    main()
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\py5_tools\tools\run_sketch.py", line 44, in main
    imported.run_code(
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\py5_tools\imported.py", line 135, in run_code
    _run_code(
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\py5_tools\imported.py", line 259, in _run_code
    _run_sketch(sketch_path, classpath, exit_if_error)
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\py5_tools\imported.py", line 196, in _run_sketch
    import py5
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\py5\__init__.py", line 84, in <module>
    from py5_tools.magics import load_ipython_extension  # noqa
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\py5_tools\magics\__init__.py", line 22, in <module>
    from .drawing import DrawingMagics, DXFDrawingMagic
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\py5_tools\magics\drawing.py", line 27, in <module>
    from IPython.display import display, SVG, Image
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\IPython\__init__.py", line 51, in <module>
    from .core.application import Application
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\IPython\core\application.py", line 26, in <module>
    from IPython.core import release, crashhandler
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\IPython\core\crashhandler.py", line 27, in <module>
    from IPython.core import ultratb
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\IPython\core\ultratb.py", line 101, in <module>
    import stack_data
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\stack_data\__init__.py", line 1, in <module>
    from .core import Source, FrameInfo, markers_from_ranges, Options, LINE_GAP, Line, Variable, RangeInLine, \
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\stack_data\core.py", line 19, in <module>
    from stack_data.utils import (
  File "C:\Users\schwe\AppData\Roaming\Thonny\plugins\Python310\site-packages\stack_data\utils.py", line 11, in <module>
    from asttokens import ASTText
ImportError: cannot import name 'ASTText' from 'asttokens' (C:\Users\schwe\AppData\Local\Programs\Thonny\lib\site-packages\asttokens\__init__.py)

I received a response from the py5 developer via Github. They also provided an explanation but it goes over my head, something about "The Python library asttokens is used for parsing syntax trees and syntax highlighting. It is not used by py5 but it might be used by Jupyter Notebook and/or JupyterLab.".我通过 Github 收到了 py5 开发人员的回复。他们还提供了一个解释,但它超出了我的理解,关于“Python 库 asttokens 用于解析语法树和语法突出显示。它不被 py5 使用,但它可能是由 Jupyter Notebook 和/或 JupyterLab 使用。”。 They also provided a solution here: enter link description here他们还在此处提供了解决方案:在此处输入链接描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 收到 EOF 错误但在 Thonny 中运行我的代码不会产生任何错误 - Getting EOF error but running my code in Thonny produces no errors 在 Thonny 的 Raspberry Pi 4b 上运行 python 文件时出错 - Error when running python file on my Raspberry Pi 4b in Thonny 运行dropbox.py时出错 - Error when running dropbox.py 使用 `Oct2py` 在 python 中运行 matlab 代码时出现 `FSolve` 错误 - `FSolve` error when running matlab code in python using `Oct2py` Visual Stdio Code、PyCharm 和 Thonny 在运行简单的 matplotlib 演示代码时表现不同 - Visual Stdio Code, PyCharm, and Thonny behave differently running simple matplotlib demo code 为什么在运行我的 discord.py 代码时出现错误? - Why do i get an error when running my discord.py code? 从编译的exe运行时,py2exe ctypes dll加载错误,但使用解释器运行代码时,则不是 - py2exe ctypes dll load error when running from compiled exe but not when running code using the interpreter Discord.py 运行我的代码时出现 VSCode 错误:NameError: name 'TOKEN' is not defined - Discord.py VSCode error when running my code: NameError: name 'TOKEN' is not defined celery 在工作模式下启动时的运行代码 - running code when celery starts in worker mode Raspberry Pi python 代码从 Thonny IDE 运行,但不从终端运行 - Raspberry Pi python code running from Thonny IDE but does not run from the terminal
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM