List index out of range on scopeStack
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
Fix Released
|
Undecided
|
John Vandenberg |
Bug Description
I am using flake8 on some Python code and after upgrading to 2.5.0 from 2.4.1 (which upgraded pyflakes) I started getting this error:
Traceback (most recent call last):
File "/home/
sys.
File "/home/
report = flake8_
File "/home/
return self._retry_
File "/home/
return func(*args, **kwargs)
File "/home/
self.
File "/home/
runner(
File "/home/
return fchecker.
File "/home/
self.
File "/home/
checker = cls(tree, self.filename)
File "/home/
withDoctest
File "/home/
self.
File "/home/
self.
File "/home/
handler(node)
File "/home/
global_scope = self.scopeStack
IndexError: list index out of range
The code I'm running pyflakes on is proprietary so unfortunately I can't share it. Any idea how to help debugging this issue?
Changed in pyflakes: | |
assignee: | nobody → John Vandenberg (jayvdb) |
status: | New → Fix Committed |
Changed in pyflakes: | |
status: | Fix Committed → Fix Released |
The relevant code was added in https:/ /github. com/pyflakes/ pyflakes/ commit/ 03ffc76367c2910 f37908105391c42 5cc4ae52da
And I am quite sure that "global_scope_index = 1 if self.withDoctest else 0" is wrong.
And https:/ /github. com/pyflakes/ pyflakes/ pull/38 should fix the problem for you.