ymichael/cprofilev

TypeError: source code string cannot contain null bytes

zom-pro opened this issue · 2 comments

I'm running Python 3.4 on Windows 7. I created a profile file using CProfile file that can be visualised using pstats. However, when I attempt to use your module raises a TypeError

[cProfileV]: cProfile output available at http://127.0.0.1:4000
Traceback (most recent call last):
File "C:\Python34\Scripts\cprofilev-script.py", line 9, in
load_entry_point('CProfileV==1.0.6', 'console_scripts', 'cprofilev')()
File "C:\Python34\lib\site-packages\cprofilev.py", line 217, in main
code = compile(fp.read(), progname, 'exec')
TypeError: source code string cannot contain null bytes

what did you enter into the command line?

I just realised that I was pointing to the output of CProfile rather than to the python script. My bad.