We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using python3, the documented API does not work:
In [1]: import timelib In [2]: timelib.strtotime('12:55') --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-2-ac895873636a> in <module>() ----> 1 timelib.strtotime('12:55') timelib.pyx in timelib.strtotime (timelib.c:1215)() TypeError: expected bytes, str found
The issue can be worked around by using byte input but I don't think that's the intended (or friendly) way of doing it:
In [3]: timelib.strtotime(b'12:55') Out[3]: 1495025700
Plus, this breaks the tests.
The text was updated successfully, but these errors were encountered:
Same here. Does anyone know how to fix this?
Sorry, something went wrong.
Another workaround is to do timelib.strtotime('12:55'.encode('utf-8'))
timelib.strtotime('12:55'.encode('utf-8'))
so:
if sys.version_info >= (3,0): timelib.strtotime('12:55'.encode('utf-8')) else: timelib.strtotime('12:55')
No branches or pull requests
When using python3, the documented API does not work:
The issue can be worked around by using byte input but I don't think that's the intended (or friendly) way of doing it:
Plus, this breaks the tests.
The text was updated successfully, but these errors were encountered: