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

Consider to remove '.decode('utf-8')? #3

Open
leonqli opened this issue Jul 11, 2022 · 2 comments
Open

Consider to remove '.decode('utf-8')? #3

leonqli opened this issue Jul 11, 2022 · 2 comments

Comments

@leonqli
Copy link

leonqli commented Jul 11, 2022

python3.10/site-packages/pytarql/pytarql.py", line 178, in emit
format=self._args.output_format).decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?

@cameronmore
Copy link

Changing this to encode 'works', but then another problem pops up

File "C:\Users\camer\AppData\Local\Programs\Python\Python311\Lib\site-packages\pytarql\pytarql.py", line 184, in emit
output.write(serialized.strip())
TypeError: write() argument must be str, not bytes

@jeraldfdo
Copy link

I just removed the decode function and used the serialized data. It worked.
serialized = self._graph.serialize(format=self._args.output_format)

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