Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

vdf2json: fix stdin/stdout for large inputs (TypeError: can't concat str to bytes) #43

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

Open
markus-wa wants to merge 1 commit into ValvePython:master
base: master
Choose a base branch
Loading
from saiko-tech:master

Conversation

@markus-wa
Copy link

@markus-wa markus-wa commented Dec 7, 2021

not sure if this works for all python versions, but I had to do this to avoid a TypeError: can't concat str to bytes

$ cat csgo_english.txt.gz | gunzip | vdf2json > /dev/null
Traceback (most recent call last):
 File "/home/mark/.local/bin/vdf2json", line 8, in <module>
 sys.exit(main())
 File "/home/mark/.local/lib/python3.8/site-packages/vdf2json/cli.py", line 39, in main
 data = vdf.loads(args.infile.read(), mapper=OrderedDict)
 File "/usr/lib/python3.8/codecs.py", line 500, in read
 data = self.bytebuffer + newdata
TypeError: can't concat str to bytes

after the fix this works

$ cat csgo_english.txt.gz | gunzip | python3 vdf2json/vdf2json/cli.py > /dev/null
// all ok, no error

Copy link
Author

friendly ping to @rossengeorgiev 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /