You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importing pdb and setting pdb.set_trace()
lets the file-execution terminate with the error statement: AttributeError: _Feature instance has no attribute '__len__' .
In the IPython-console type: speedyo.hello_world()
What is the expected output? What do you see instead?
Expected:
file starts with the debugger and the ipdb command line: ipdb>
After typing 'c' the words 'Hello world!' are printed in the IPython-console.
Instead the following output appears:
In [2]: speedyo.hello_world()
Traceback (most recent call last):
File "<ipython-input-2-c923dc13a4b5>", line 1, in <module>
speedyo.hello_world()
File "C:/Users/Public/SVN_Workspace/ltc_2947_8_9/lab/python/axels.py", line 16, in hello_worldprint('Hello world!')
File "C:/Users/Public/SVN_Workspace/ltc_2947_8_9/lab/python/axels.py", line 16, in hello_worldprint('Hello world!')
File "c:\python27_64\lib\bdb.py", line 49, in trace_dispatchreturnself.dispatch_line(frame)
File "c:\python27_64\lib\bdb.py", line 67, in dispatch_lineself.user_line(frame)
File "c:\python27_64\lib\pdb.py", line 158, in user_lineself.interaction(frame, None)
File "c:\python27_64\lib\site-packages\spyder\utils\site\sitecustomize.py", line 414, in interactionself.notify_spyder(frame)
File "c:\python27_64\lib\site-packages\spyder\utils\site\sitecustomize.py", line 352, in notify_spyder
ipython_shell.kernel.publish_pdb_state()
File "c:\python27_64\lib\site-packages\spyder\utils\ipython\spyder_kernel.py", line 219, in publish_pdb_state
var_properties =self.get_var_properties(),
File "c:\python27_64\lib\site-packages\spyder\utils\ipython\spyder_kernel.py", line 132, in get_var_properties'len': self._get_len(value),
File "c:\python27_64\lib\site-packages\spyder\utils\ipython\spyder_kernel.py", line 322, in _get_lenreturnlen(var)
AttributeError: _Feature instance has no attribute '__len__'
Please provide any additional information below
When commenting out the line 'from future import print_function' and restarting the IPython-console the behavior is as expected - no crash.
Versions and main components
Spyder Version: 3.2.0
Python Version: 2.7.13 64 bits
Qt Version: 4.8.7
PyQt Version: 4.11.4
Operating system: Windows
Dependencies
Please go to the menu entry Help > Optional Dependencies (or Help > Dependencies), press the button Copy to clipboard
and paste the contents below:
IPython >=4.0;<6.0: 5.4.1 (OK)
cython >=0.21 : None (NOK)
jedi >=0.9.0 : 0.10.2 (OK)
nbconvert >=4.0 : 5.2.1 (OK)
numpy >=1.7 : 1.12.0 (OK)
pandas >=0.13.1 : None (NOK)
pycodestyle >=2.3 : 2.3.1 (OK)
pyflakes >=0.5.0 : 1.5.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : 1.7.2 (OK)
qtconsole >=4.2.0 : 4.3.0 (OK)
rope >=0.9.4 : 0.10.5 (OK)
sphinx >=0.6.6 : 1.6.3 (OK)
sympy >=0.7.3 : None (NOK)
The text was updated successfully, but these errors were encountered:
AxelMKlein
changed the title
Spyder 3.2.0, Python 2.7.13: pdb: Python file execution fails with 'AttributeError: _Feature instance has no attribute '__len__' ' with 'from __future__ import print_function'
Spyder 3.2.0, Python 2.7.13: pdb: Python file execution fails with 'AttributeError: _Feature instance has no attribute '__len__' ' when using 'from __future__ import print_function'
Jul 31, 2017
ccordoba12
changed the title
Spyder 3.2.0, Python 2.7.13: pdb: Python file execution fails with 'AttributeError: _Feature instance has no attribute '__len__' ' when using 'from __future__ import print_function'
File execution fails with AttributeError: _Feature instance has no attribute __len__
Jul 31, 2017
ccordoba12
changed the title
File execution fails with AttributeError: _Feature instance has no attribute __len__
File execution fails with AttributeError: _Feature instance has no attribute '__len__'
Jul 31, 2017
Description of your problem
from __future__ import print_function
andpdb.set_trace()
lets the file-execution terminate with the error statement:
AttributeError: _Feature instance has no attribute '__len__'
.What steps will reproduce the problem?
What is the expected output? What do you see instead?
Expected:
Instead the following output appears:
Please provide any additional information below
When commenting out the line 'from future import print_function'
and restarting the IPython-console the behavior is as expected - no crash.
Versions and main components
Dependencies
Please go to the menu entry
Help > Optional Dependencies
(orHelp > Dependencies
), press the buttonCopy to clipboard
and paste the contents below:
IPython >=4.0;<6.0: 5.4.1 (OK)
cython >=0.21 : None (NOK)
jedi >=0.9.0 : 0.10.2 (OK)
nbconvert >=4.0 : 5.2.1 (OK)
numpy >=1.7 : 1.12.0 (OK)
pandas >=0.13.1 : None (NOK)
pycodestyle >=2.3 : 2.3.1 (OK)
pyflakes >=0.5.0 : 1.5.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : 1.7.2 (OK)
qtconsole >=4.2.0 : 4.3.0 (OK)
rope >=0.9.4 : 0.10.5 (OK)
sphinx >=0.6.6 : 1.6.3 (OK)
sympy >=0.7.3 : None (NOK)
The text was updated successfully, but these errors were encountered: