Bug 1494055 - Debug fails with NameError: name 'dict_pop' is not defined
Summary: Debug fails with NameError: name 'dict_pop' is not defined
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: eclipse-pydev
Version: 26
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Alexander Kurtakov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-21 12:08 UTC by igiwatson
Modified: 2017-09-21 13:26 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-09-21 13:07:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
eclipse pydev project 'kateBug'. (48.73 KB, application/x-gzip)
2017-09-21 12:08 UTC, igiwatson
no flags Details

Description igiwatson 2017-09-21 12:08:11 UTC
Created attachment 1328967 [details]
eclipse pydev project 'kateBug'.

Description of problem:
'Debug' fails to excute, stopping with,
NameError: name 'dict_pop' is not defined

The normal Run executes as expected.

Version-Release number of selected component (if applicable):
eclipse-pydev-5.9.0-1.fc26.x86_64
python3-3.6.2-5.fc26.x86_64

How reproducible:
Create an eclipse pydev project. Copy in the attached files. Refresh.
Load 'kate.py'.

Steps to Reproduce:
1. Run kate.py
Output will be,
2017-09-21 12:52:10,395: RobotUSBISS: INFO: 
2017-09-21 12:52:10,396: RobotUSBISS: INFO: START logging for /home/igw/workspace/kateBug/kate.py.
2017-09-21 12:52:10,397: RobotUSBISS: INFO: Initialising Robot I2C device.
2017-09-21 12:52:10,397: RobotUSBISS: INFO: Preferred port saved to, robotusbiss_port.txt
2017-09-21 12:52:10,398: RobotUSBISS: INFO:   Well that was nice. All done.
RegFields> Read register mapping from file regMappingFile.txt
Read BGTRIM  Got 0
Write BGTRIM 7
Read BGTRIM  Got 7
Write BGTRIM -8
Read BGTRIM  Got -8


2. Set break point at line 249, if __name__ == "__main__":
Run Debug.
warning: Debugger speedups using cython not found. Run '"/usr/bin/python3.6" "/usr/lib/eclipse/droplets/pydev-core/eclipse/plugins/org.python.pydev_5.9.0.v20170811-1258/pysrc/setup_cython.py" build_ext --inplace' to build.
pydev debugger: starting (pid: 5437)
Traceback (most recent call last):
  File "/usr/lib/eclipse/droplets/pydev-core/eclipse/plugins/org.python.pydev_5.9.0.v20170811-1258/pysrc/_pydevd_bundle/pydevd_frame.py", line 613, in trace_dispatch
    self.do_wait_suspend(thread, frame, event, arg)
  File "/usr/lib/eclipse/droplets/pydev-core/eclipse/plugins/org.python.pydev_5.9.0.v20170811-1258/pysrc/_pydevd_bundle/pydevd_frame.py", line 126, in do_wait_suspend
    self._args[0].do_wait_suspend(*args, **kwargs)
  File "/usr/lib/eclipse/droplets/pydev-core/eclipse/plugins/org.python.pydev_5.9.0.v20170811-1258/pysrc/pydevd.py", line 764, in do_wait_suspend
    self._activate_mpl_if_needed()
  File "/usr/lib/eclipse/droplets/pydev-core/eclipse/plugins/org.python.pydev_5.9.0.v20170811-1258/pysrc/pydevd.py", line 415, in _activate_mpl_if_needed
    activate_function = dict_pop(self.mpl_modules_for_patching, module)
NameError: name 'dict_pop' is not defined
Traceback (most recent call last):
  File "/usr/lib/eclipse/droplets/pydev-core/eclipse/plugins/org.python.pydev_5.9.0.v20170811-1258/pysrc/pydevd.py", line 1621, in <module>
    main()
  File "/usr/lib/eclipse/droplets/pydev-core/eclipse/plugins/org.python.pydev_5.9.0.v20170811-1258/pysrc/pydevd.py", line 1615, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "/usr/lib/eclipse/droplets/pydev-core/eclipse/plugins/org.python.pydev_5.9.0.v20170811-1258/pysrc/pydevd.py", line 1022, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/usr/lib/eclipse/droplets/pydev-core/eclipse/plugins/org.python.pydev_5.9.0.v20170811-1258/pysrc/_pydev_imps/_pydev_execfile.py", line 25, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/home/igw/workspace/kateBug/kate.py", line 249, in <module>
    if __name__ == "__main__":
  File "/home/igw/workspace/kateBug/kate.py", line 249, in <module>
    if __name__ == "__main__":
  File "/usr/lib/eclipse/droplets/pydev-core/eclipse/plugins/org.python.pydev_5.9.0.v20170811-1258/pysrc/_pydevd_bundle/pydevd_frame.py", line 613, in trace_dispatch
    self.do_wait_suspend(thread, frame, event, arg)
  File "/usr/lib/eclipse/droplets/pydev-core/eclipse/plugins/org.python.pydev_5.9.0.v20170811-1258/pysrc/_pydevd_bundle/pydevd_frame.py", line 126, in do_wait_suspend
    self._args[0].do_wait_suspend(*args, **kwargs)
  File "/usr/lib/eclipse/droplets/pydev-core/eclipse/plugins/org.python.pydev_5.9.0.v20170811-1258/pysrc/pydevd.py", line 764, in do_wait_suspend
    self._activate_mpl_if_needed()
  File "/usr/lib/eclipse/droplets/pydev-core/eclipse/plugins/org.python.pydev_5.9.0.v20170811-1258/pysrc/pydevd.py", line 415, in _activate_mpl_if_needed
    activate_function = dict_pop(self.mpl_modules_for_patching, module)
NameError: name 'dict_pop' is not defined


Additional info:
1.
If the file is run in debug, with no break points set, it executes correctly.

2.
I have found that commenting line 26, import katerig
allows debug to run.

3. I have run the same files in 'eric' IDE and it executes in debug without any problem.

Comment 1 Mat Booth 2017-09-21 12:25:12 UTC
Hi,

Can you test the latest version of Pydev from updates-testing?

https://bodhi.fedoraproject.org/updates/FEDORA-2017-d71084be94

If you still see the problem in the latest version, I can investigate further.

Comment 2 igiwatson 2017-09-21 13:07:07 UTC
OK that seems to solve the problem.
Next time I will remember to try the testing channel.
Many thanks.

Comment 3 Mat Booth 2017-09-21 13:26:43 UTC
Great stuff, thanks for testing!


Note You need to log in before you can comment on or make changes to this bug.