Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't concat str to bytes #16

Open
mauricev opened this issue Feb 23, 2020 · 2 comments
Open

can't concat str to bytes #16

mauricev opened this issue Feb 23, 2020 · 2 comments

Comments

@mauricev
Copy link

Invoking syrupy.py results in the following
SYRUPY: Writing process resource usage samples to 'syrupy_20200223183224.ps.log'
SYRUPY: Writing raw process resource usage logs to 'syrupy_20200223183224.ps.raw'
SYRUPY: sampling top 5 processes by memory usage
Traceback (most recent call last):
File "./syrupy.py", line 717, in
main()
File "./syrupy.py", line 670, in main
debug_level=opts.debug)
File "./syrupy.py", line 299, in profile_process
debug_level=debug_level)
File "./syrupy.py", line 170, in poll_process
raw_ps_log.write(stdout + "\n")
TypeError: can't concat str to bytes

@h-larsson
Copy link

Get same error with python 3.7. It works for python2, though.

@jeetsukumaran
Copy link
Owner

The piped stdout is a byte vector. Needs to be converted to a string in Python 3.7. Simple one-liner. Will happily accept a PR, or otherwise will have to wait till I have time to do it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants