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

Python 3: str(TaskwarriorError(...)): TypeError: __str__ returned non-string (type bytes) #125

Open
fdcds opened this issue Jul 23, 2019 · 0 comments

Comments

@fdcds
Copy link

fdcds commented Jul 23, 2019

Python 3.6.8 (default, Jan 14 2019, 11:02:34) 
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from taskw.exceptions import TaskwarriorError
>>> str(TaskwarriorError("X", "Y", "Z", 1))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __str__ returned non-string (type bytes)
pip3 freeze | grep taskw==
taskw==1.2.0
fdcds added a commit to fdcds/taskw that referenced this issue Jul 23, 2019
`__str__` should return a string, but `string.encode(...)` returns bytes instead. This commit fixes it by decoding the bytes back to a string.

Fixes: ralphbean#125
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

Successfully merging a pull request may close this issue.

1 participant