Skip to content

Error: unicode argument expected, got 'str' #24

@ghost

Description

Hi! I'm trying to use cprofilev. I'm not a python geek. So maybe you can help me the error I'm facing.
When I launch: python -m cprofilev -p 11100 /path/to/x.py
(I used another port because 4000 was already use)
My program starts.. but if I connect to localhost:11100 during the execution I see a server error page.
My port scan see this port open.
My program lasts about 5 minutes and has a lot of print logs.

When the program has finished I see this error as well on the terminal:

Traceback (most recent call last):
File "/Users/andreapigatto/anaconda/lib/python2.7/site-packages/bottle.py", line 862, in _handle
return route.call(*_args)
File "/Users/andreapigatto/anaconda/lib/python2.7/site-packages/bottle.py", line 1732, in wrapper
rv = callback(_a, **ka)
File "/Users/andreapigatto/anaconda/lib/python2.7/site-packages/cprofilev.py", line 164, in route_handler
'stats': self.stats.sort(sort).show(func_name).read(),
File "/Users/andreapigatto/anaconda/lib/python2.7/site-packages/cprofilev.py", line 125, in show
self.stats.print_stats(restriction)
File "/Users/andreapigatto/anaconda/lib/python2.7/pstats.py", line 351, in print_stats
print >> self.stream, indent, self.total_calls, "function calls",
TypeError: unicode argument expected, got 'str'

Can you give me some tips about how to solve and what can be?

Many thanks
Andrea

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions