Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#300 Internal error on slice of empty array

0.8.19
open
nobody
None
5
2011-11-15
2011-11-15
No

When processing the attached file slice.py with PyChecker 0.8.19, I get the following error:
Processing module slice (slice.py)...

Warnings...

slice.py:4: INTERNAL ERROR -- STOPPED PROCESSING FUNCTION --
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pychecker/warn.py", line 242, in _checkFunction
_checkCode(code, codeSource)
File "/usr/lib/python2.7/dist-packages/pychecker/warn.py", line 153, in _checkCode
dispatch_func(oparg, operand, codeSource, code)
File "/usr/lib/python2.7/dist-packages/pychecker/CodeChecks.py", line 1762, in _BUILD_SLICE
sl = source[start:stop:step]
TypeError: slice indices must be integers or None or have an __index__ method

I don't get this error with PyChecker 0.8.18. Using python 2.6.7 instead of 2.7.2+ doesn't change the behavior: the bug appears in 0.8.19 but not 0.8.18.

Discussion

  • Valid source file but PyChecker has an internal error on it

     
    Attachments