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

coverage using django 1.4 with pydb on #201

Closed
nedbat opened this issue Oct 9, 2012 · 1 comment
Closed

coverage using django 1.4 with pydb on #201

nedbat opened this issue Oct 9, 2012 · 1 comment
Labels
bug Something isn't working run

Comments

@nedbat
Copy link
Owner

nedbat commented Oct 9, 2012

Originally reported by Anonymous


I'm getting a crash when running coverage with django 1.4 under eclipse, i.e. under the debugger. At issue seems to be this line:
collectory.py:256: traces0 = getattr(tracer0, 'traces', None)

In my case, there appears to be no traces, so traces0 is None, but then we try to iterate over it in the next section:
(261): for args in traces0:

Seems the getattr should be getattr(tracer0, 'traces', []), instead of None.

However, it's also entirely possible that running under pydb is not supported.

Thoughts?

P.S.
File "/Library/Python/2.7/site-packages/coverage-3.5.3-py2.7-macosx-10.8-intel.egg/coverage/control.py", line 383, in start
self.collector.start()
File "/Library/Python/2.7/site-packages/coverage-3.5.3-py2.7-macosx-10.8-intel.egg/coverage/collector.py", line 261, in start
for args in traces0:
TypeError: 'NoneType' object is not iterable


@nedbat
Copy link
Owner Author

nedbat commented Oct 13, 2012

Hmm, i don't know pydb, and it's likely that you can't debug with coverage running anyway, since both want to use trace functions. But, you are right, the default of [] seems correct, and None seems bad.

Fixed in <<changeset 2d00e627d48d (bb)>>.

@nedbat nedbat closed this as completed Oct 13, 2012
@nedbat nedbat added minor bug Something isn't working run labels Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working run
Projects
None yet
Development

No branches or pull requests

1 participant