Open
Description
If you see this warning and the errors caused by it, please ensure you are running your code in the environment where the source code is available at runtime.
Typical environment where the source code is not available at runtime:
- Raw Python REPL (type
python
from command line and run your code there) exec()
If you want to use a Python REPL to run your code, ipython
, bpython
and jupyter notebook
are recommended.
If you can't avoid using exec()
, use exec_code()
from varname.helpers
instead.
What if I want to use exec()
anyway? The idea is to tell exec
where to retrieve the source code. See how exec_code()
is implemented:
python-varname/varname/helpers.py
Lines 229 to 297 in ea1ec82
Related:
Metadata
Metadata
Assignees
Labels
No labels