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

TypeError: __str__ returned non-string (type bytes) #11

Open
juan11iguel opened this issue Apr 15, 2023 · 0 comments
Open

TypeError: __str__ returned non-string (type bytes) #11

juan11iguel opened this issue Apr 15, 2023 · 0 comments

Comments

@juan11iguel
Copy link

The str method is returning a string but as a byte (with a b' preceding the string svg)

image

I have seen there is a pull request related to this (#6), but for me this is what fixed it:

    def __str__(self):
        return etree.tostring(self._doc, encoding='utf8', method='xml').decode('utf8')
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

1 participant