Open ale-dd opened 7 months ago
you're once again finding the best edge cases!
could you insert a pdb.set_trace()
in site-packages/stackprinter/frame_formatting.py line 225 to check on which kind of inputs / source file it happens? (happy to use a private channel too)
The next time, everything worked as intended. This seems likely a lot harder to reproduce...
(I'll add the pdb hook, hoping to see this again)
thanks! could you place this extended piece of debug code in frame_formatting.py line 222? just to grab as much info as possible in the event it happens again
if not set(source_lines).issubset(fi.source_map.keys()):
debug_vals = [self.lines, lineno, source_lines, fi.head_lns, fi.source_map.keys(), fi]
info = ', '.join(str(p) for p in debug_vals)
raise Exception("Picked an invalid source context. Debug info: %r" % info)
Ran into a "Picked an invalid source context".
I've only seen this once thus far. On python
3.12.0
with StackPrinter0.2.12
.