0

I'm working on a project that uses Nosetests and the Sniffer autotester, and I ran into an odd occurance with Sniffer. When I first run Sniffer, one of my routes tests will pass as expected, but on every subsequent time it runs (as a result of saving a file), that test will fail generating an

OverflowError: Maximum recursion level reached.

My project uses Pandas, and it appears to bomb out inside a to_json function, but since it's only occurring when Sniffer makes a second run, I feel the issue isn't with Pandas, but Sniffer. I cannot reproduce the error when running Nose via the nosetests command, which is more evidence the problem lies with the autotester.

Is there a good way to debug such a problem? It seems as if there's some leftover state from the first time Sniffer runs, and that's tripping it up on the second run, but as I'm not quite sure how to debug this I can't be sure. Any ideas? I can provide code if necessary but it's more of a general how do I debug this kind of question.

Grant David Bachman
  • 2,158
  • 3
  • 21
  • 32

1 Answers1

0

Try running your nosetests with --pdb It will get you a debugger prompt on OverflowError and you'd be able to see the stack trace of calls.

Oleksiy
  • 6,337
  • 5
  • 41
  • 58
  • I tried that, i was never able to get it to hit the OverflowError when running nosetests standalone. Another reason I'm pretty sure the issue is with sniffer. – Grant David Bachman Aug 11 '14 at 19:09
  • If you manage to start your test from the python shell, you can do post-mortem debugging with `import pdb;pdb.pm()`. You can also inject a break point at the the point of failure with `pdb.set_trace()` – Oleksiy Aug 11 '14 at 21:14