问答交流

import dai调试报错

由bq3m81rk创建,最终由bq3m81rk 被浏览 1 用户

import dai的时候,调试报了下面这个错误

  • Traceback (most recent call last):
  • File "_pydevd_bundle/pydevd_cython.pyx", line 1343, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch
  • File "_pydevd_bundle/pydevd_cython.pyx", line 309, in _pydevd_bundle.pydevd_cython.PyDBFrame.set_suspend
  • File "/opt/pyenv/versions/3.11.8/lib/python3.11/site-packages/debugpy/_vendored/pydevd/pydevd.py", line 1892, in set_suspend
  • suspend_all_threads(self, except_thread=thread)
  • File "/opt/pyenv/versions/3.11.8/lib/python3.11/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py", line 94, in suspend_all_threads
  • py_db.set_trace_for_frame_and_parents(frame)
  • File "/opt/pyenv/versions/3.11.8/lib/python3.11/site-packages/debugpy/_vendored/pydevd/pydevd.py", line 2246, in set_trace_for_frame_and_parents
  • frame.f_trace = self.trace_dispatch
  • ^^^^^^^^^^^^^
  • RuntimeError: f_trace is not writable in Nuitka, ignore with '--no-deployment-flag=frame-useless-set-trace'
  • 您可以去社区论坛问答交流板块反馈咨询 去发帖>> --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) Cell In[1], line 2 1 import dai ----> 2 from bigmodule import M Cell In[1], line 2 1 import dai ----> 2 from bigmodule import M File _pydevd_bundle/pydevd_cython.pyx:1457, in _pydevd_bundle.pydevd_cython.SafeCallWrapper.call() File _pydevd_bundle/pydevd_cython.pyx:701, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch() File _pydevd_bundle/pydevd_cython.pyx:1395, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch() File _pydevd_bundle/pydevd_cython.pyx:1343, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch() File _pydevd_bundle/pydevd_cython.pyx:309, in _pydevd_bundle.pydevd_cython.PyDBFrame.set_suspend() File /opt/pyenv/versions/3.11.8/lib/python3.11/site-packages/debugpy/_vendored/pydevd/pydevd.py:1892, in PyDB.set_suspend(self, thread, stop_reason, suspend_other_threads, is_pause, original_step_cmd) 1888 suspend_other_threads = True 1890 if suspend_other_threads: 1891 # Suspend all except the current one (which we're currently suspending already). -> 1892 suspend_all_threads(self, except_thread=thread) File /opt/pyenv/versions/3.11.8/lib/python3.11/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py:94, in suspend_all_threads(py_db, except_thread) 92 if frame is not None: 93 try: ---> 94 py_db.set_trace_for_frame_and_parents(frame) 95 finally: 96 frame = None File /opt/pyenv/versions/3.11.8/lib/python3.11/site-packages/debugpy/_vendored/pydevd/pydevd.py:2246, in PyDB.set_trace_for_frame_and_parents(self, frame, **kwargs) 2244 elif frame.f_trace is not self.trace_dispatch: 2245 pydev_log.debug('Set tracing of frame: %s - %s', frame.f_code.co_filename, frame.f_code.co_name) -> 2246 frame.f_trace = self.trace_dispatch 2247 else: 2248 pydev_log.debug('SKIP set tracing of frame: %s - %s', frame.f_code.co_filename, frame.f_code.co_name) RuntimeError: f_trace is not writable in Nuitka, ignore with '--no-deployment-flag=frame-useless-set-trace'

\

{link}