Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Local variable 'reply' referenced before assignment" on debugger exit #3471

Closed
robbuckley opened this issue Sep 28, 2016 · 3 comments
Closed

Comments

@robbuckley
Copy link

Description of your problem

What steps will reproduce the problem?

  1. a program im debugging runs to completion and exits normally
  2. crash

What is the expected output? What do you see instead?

Internal console:

Traceback (most recent call last):
File "C:\Users\Rob Buckley\Anaconda2\lib\site-packages\qtconsole\base_frontend_mixin.py", line 163, in _dispatch
handler(msg)
File "C:\Users\Rob Buckley\Anaconda2\lib\site-packages\spyder\widgets\ipythonconsole\debugging.py", line 136, in _handle_stream
self._input_reply = reply
UnboundLocalError: local variable 'reply' referenced before assignment

Please provide any additional information below
As temporary hack i changed debugger.py line 136
from
self._input_reply = reply
to
self._input_reply = None

Versions and main components

  • Spyder Version: 3.0.0 (via conda)
  • Python Version: 2.7.12
  • Operating system: Windows 10

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0 : 1.5.3 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.11.1 (OK)
pandas >=0.13.1 : 0.18.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
pyflakes >=0.5.0 : 1.3.0 (OK)
pygments >=2.0 : 2.1.3 (OK)
pylint >=0.25 : 1.5.4 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4 (OK)
sphinx >=0.6.6 : 1.4.6 (OK)
sympy >=0.7.3 : 1.0 (OK)

@ccordoba12
Copy link
Member

Thanks for reporting. Could you post a simple program that generates this error?

@ccordoba12 ccordoba12 changed the title local variable 'reply' referenced before assignment in debugger.py on debugger exit "Local variable 'reply' referenced before assignment" on debugger exit Sep 28, 2016
@robbuckley
Copy link
Author

hi - to WAR this issue i downgraded to 2.3.9. When i upgraded again i got into a mess with qt bindings so i ended up reinstalling a clean environment. Now i cant seem to reproduce the issue!

looking at _handle_stream() in Anaconda2\lib\site-packages\spyder\widgets\ipythonconsole\debugging.py, I cant see where reply gets assigned to before its referenced in line 136. Maybe this is just a rarely used path?

sorry thats all i can offer. Feel free to close

@ccordoba12
Copy link
Member

Thanks. In any case, I'll check if reply can go unreferenced before closing :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants