Closed joleroi closed 7 years ago
When I run this script
import numpy as np @profile def myadd(a, b): return a + b for a,b in zip(np.arange(10), np.arange(10)): print(myadd(a,b))
on my machine with
python --version Python 3.5.3 :: Continuum Analytics, Inc.
and
conda list line_profile # packages in environment at <...>/Software/miniconda3/envs/headversions: # line_profiler 2.0 py35_0
it fails with this traceback
kernprof -l python test.py Wrote profile results to python.lprof Traceback (most recent call last): File "/home/kingj/Software/miniconda3/envs/headversions/bin/kernprof", line 6, in <module> sys.exit(kernprof.main()) File "/home/kingj/Software/miniconda3/envs/headversions/lib/python3.5/site-packages/kernprof.py", line 222, in main execfile(script_file, ns, ns) File "/home/kingj/Software/miniconda3/envs/headversions/lib/python3.5/site-packages/kernprof.py", line 35, in execfile exec_(compile(f.read(), filename, 'exec'), globals, locals) ValueError: source code string cannot contain null bytes
Any idea what could cause this?
kernprof -l test.py not kernprof -l python test.py
kernprof -l test.py
kernprof -l python test.py
:see_no_evil:
When I run this script
on my machine with
and
it fails with this traceback
Any idea what could cause this?