1

I'm going through the "getting started" on the pydev website and everything had been working as described until I got to the section on debugging found at http://www.pydev.org/manual_101_run.html. However, I am now getting the warning "debugger speedups using cython not found" followed by an error when it tries to handle that exception.

The code I'm trying to run is titled example.py:

'''
Created on Nov 7, 2018

@author: Chris
'''
if __name__ == '__main__':
    print('Hello World')

When I run this without debugging mode on, it correctly prints 'Hello World' to the console. As is recommended in the getting started page, I added a breakpoint to line 7 and re-ran the code in debugging mode (by pressing F11). When I do so, I get the following console output:

warning: Debugger speedups using cython not found. Run '"C:\Users\Chris\AppData\Local\Programs\Python\Python37\python.exe" "C:\Users\Chris\.p2\pool\plugins\org.python.pydev.core_7.0.0.201811071319\pysrc\setup_cython.py" build_ext --inplace' to build.
pydev debugger: starting (pid: 7864)
Traceback (most recent call last):
  File "_pydevd_bundle\pydevd_cython_win32_37_64.pyx", line 134, in _pydevd_bundle.pydevd_cython_win32_37_64.set_additional_thread_info
AttributeError: '_MainThread' object has no attribute 'additional_info'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Chris\.p2\pool\plugins\org.python.pydev.core_7.0.0.201811071319\pysrc\pydevd.py", line 1951, in <module>
    main()
  File "C:\Users\Chris\.p2\pool\plugins\org.python.pydev.core_7.0.0.201811071319\pysrc\pydevd.py", line 1945, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "C:\Users\Chris\.p2\pool\plugins\org.python.pydev.core_7.0.0.201811071319\pysrc\pydevd.py", line 1295, in run
    self.notify_thread_created(thread_id, t)
  File "C:\Users\Chris\.p2\pool\plugins\org.python.pydev.core_7.0.0.201811071319\pysrc\pydevd.py", line 662, in notify_thread_created
    additional_info = set_additional_thread_info(thread)
  File "_pydevd_bundle\pydevd_cython_win32_37_64.pyx", line 138, in _pydevd_bundle.pydevd_cython_win32_37_64.set_additional_thread_info
  File "_pydevd_bundle\pydevd_cython_win32_37_64.pyx", line 147, in _pydevd_bundle.pydevd_cython_win32_37_64.set_additional_thread_info
  File "_pydevd_bundle\pydevd_cython_win32_37_64.pyx", line 95, in _pydevd_bundle.pydevd_cython_win32_37_64.PyDBAdditionalThreadInfo.__init__
AttributeError: '_pydevd_bundle.pydevd_cython_win32_37_64.PyDBAdditionalThreadInfo' object has no attribute 'pydev_state'

The related question Eclipse pydev warning - "Debugger speedups using cython not found." recommended running the code in the first line of the warning

"C:\Users\Chris\AppData\Local\Programs\Python\Python37\python.exe" "C:\Users\Chris\.p2\pool\plugins\org.python.pydev.core_7.0.0.201811071319\pysrc\setup_cython.py" build_ext --inplace

When I do so, I get the following error

  File "<input>", line 1
    "C:\Users\Chris\AppData\Local\Programs\Python\Python37\python.exe" "C:\Users\Chris\.p2\pool\plugins\org.python.pydev.core_7.0.0.201811071319\pysrc\setup_cython.py" build_ext --inplace
                                                                                                                                                                                ^
SyntaxError: invalid syntax

In case it is not obvious, I am an an utmost novice with python, eclipse, StackOverflow, and PyDev - having started in each of them this morning.

S Bennett
  • 11
  • 3

1 Answers1

0

Regarding the issue of it not working in the first place, see: https://stackoverflow.com/a/53210935/110451 (in your case, just upgrading PyDev to 7.0.3 should fix the issue).

Now regarding not being able to regenerate the cython accelerator modules, you should execute:

"C:\Users\Chris\AppData\Local\Programs\Python\Python37\python.exe" "C:\Users\Chris\.p2\pool\plugins\org.python.pydev.core_7.0.0.201811071319\pysrc\setup_cython.py" build_ext --inplace

in your terminal (i.e.: in cmd.exe) and not as a Python module...

Fabio Zadrozny
  • 24,814
  • 4
  • 66
  • 78