We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@pysnooper.snoop() def hello(): for i in range(10): print(i)
In [10]: --------------------------------------------------------------------------- IndexError Traceback (most recent call last) in ----> 1 import codecs, os;__pyfile = codecs.open('''/tmp/pybsaClo''', encoding='''utf-8''');__code = __pyfile.read().encode('''utf-8''');__pyfile$
/export/zxf/workspace/tmp/testsnoop.py in 22 23 ---> 24 hello()
</home/zxf/anaconda3/lib/python3.6/site-packages/decorator.py:decorator-gen-152> in hello()
~/anaconda3/lib/python3.6/site-packages/PySnooper-0.0.11-py3.6.egg/pysnooper/pysnooper.py in decorate(function, *args, **kwargs) 70 write=write, variables=variables, 71 depth=depth, prefix=prefix): ---> 72 return function(*args, **kwargs) 73 74 return decorate
/export/zxf/workspace/tmp/testsnoop.py in hello() 15 16 ---> 17 @pysnooper.snoop() 18 def hello(): 19 for i in range(10):
~/anaconda3/lib/python3.6/site-packages/PySnooper-0.0.11-py3.6.egg/pysnooper/tracer.py in trace(self, frame, event, arg) 182 183 now_string = datetime_module.datetime.now().time().isoformat() --> 184 source_line = get_source_from_frame(frame)[frame.f_lineno - 1] 185 self.write('{indent}{now_string} {event:9} ' 186 '{frame.f_lineno:4} {source_line}'.format(**locals()))
IndexError: list index out of range
The text was updated successfully, but these errors were encountered:
But if I remove the decrator, it runs ok.
Sorry, something went wrong.
Duplicate of #16
@iecaser PySnooper now works in Jupyter and IPython :)
No branches or pull requests
In [10]: ---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
in
----> 1 import codecs, os;__pyfile = codecs.open('''/tmp/pybsaClo''', encoding='''utf-8''');__code = __pyfile.read().encode('''utf-8''');__pyfile$
/export/zxf/workspace/tmp/testsnoop.py in
22
23
---> 24 hello()
</home/zxf/anaconda3/lib/python3.6/site-packages/decorator.py:decorator-gen-152> in hello()
~/anaconda3/lib/python3.6/site-packages/PySnooper-0.0.11-py3.6.egg/pysnooper/pysnooper.py in decorate(function, *args, **kwargs)
70 write=write, variables=variables,
71 depth=depth, prefix=prefix):
---> 72 return function(*args, **kwargs)
73
74 return decorate
/export/zxf/workspace/tmp/testsnoop.py in hello()
15
16
---> 17 @pysnooper.snoop()
18 def hello():
19 for i in range(10):
~/anaconda3/lib/python3.6/site-packages/PySnooper-0.0.11-py3.6.egg/pysnooper/tracer.py in trace(self, frame, event, arg)
182
183 now_string = datetime_module.datetime.now().time().isoformat()
--> 184 source_line = get_source_from_frame(frame)[frame.f_lineno - 1]
185 self.write('{indent}{now_string} {event:9} '
186 '{frame.f_lineno:4} {source_line}'.format(**locals()))
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: