- Notifications
You must be signed in to change notification settings - Fork 385
Closed
Description
I ran memory_profiler on a python code which had unicode text inside it and the code shows this error
Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/data/project/checkdictation-fa/www/python/venv/lib/python2.7/site-packages/memory_profiler.py", line 992, in <module> show_results(prof, precision=options.precision, stream=out_file) File "/data/project/checkdictation-fa/www/python/venv/lib/python2.7/site-packages/memory_profiler.py", line 621, in show_results stream.write(unicode(tmp)) UnicodeDecodeError: 'ascii' codec can't decode byte 0xdb in position 53: ordinal not in range(128) I changed line 621stream.write(unicode(tmp))
tostream.write(unicode(tmp,'UTF-8'))
and and it is ok please solve this bug
Metadata
Metadata
Assignees
Labels
No labels