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

[BUG] ValueError: time data does not match format #125

Open
asfak-ur-rahman opened this issue Dec 11, 2024 · 1 comment
Open

[BUG] ValueError: time data does not match format #125

asfak-ur-rahman opened this issue Dec 11, 2024 · 1 comment

Comments

@asfak-ur-rahman
Copy link

Hello, I have been using the DeepL (v1.18.0) to translate documents since 26/Dec/2023. But suddenly it stopped working yesterday (10/Dec/2024) after 4 am PST and our last 30 translation requests were not complete.

I have not made any changes recently. As per my investigation, I have noticed the following error in translator.get_glossary().

File "/home/guardiansofthein/py_api/helper.py", line 2222, in deepl_api_translate_doc
    my_glossary = translator.get_glossary(glossary_id)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guardiansofthein/py_api/ve_py312/lib/python3.12/site-packages/deepl/translator.py", line 979, in get_glossary
    return GlossaryInfo.from_json(json)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guardiansofthein/py_api/ve_py312/lib/python3.12/site-packages/deepl/api_data.py", line 154, in from_json
    datetime.datetime.strptime(
File "/usr/local/lib/python3.12/_strptime.py", line 554, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/_strptime.py", line 333, in _strptime
    raise ValueError("time data %r does not match format %r" %

ValueError: time data '0001-01-01T00:0000' does not match format '%Y-%m-%dT%H:%M:%S.%f%z'

I am just passing glossary_id in the get_glossary() function, but I have no control over the time data. So how can I fix this error now?

@asfak-ur-rahman asfak-ur-rahman changed the title ValueError: time data does not match format [BUG] ValueError: time data does not match format Dec 11, 2024
@JanEbbing
Copy link
Member

This is due to DeepLcom/deepl-api-issues#37

We are on it, thanks for reporting.

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

2 participants