-
Notifications
You must be signed in to change notification settings - Fork 120
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
ValueError: time data '' does not match format '%A, %d %B %Y %I:%M:%S %p' #98
Comments
Same issue here, using Windows in this case. |
@Krystalqx I was able to find the cause of the issue in my case. The added notes were in Spanish syntax. I switched the language to English, and generated a new note. You can see the datetime format difference in the next screenshot. However, as you can see, clippings.txt does not get refactor based on Kindle's language change. Therefore, I think this library should support the different date formats Kindle has @paperboi if possible :) If I suppress all my Spanish notes and keep the English ones, transfer is successful. |
I had the same problem with a german file and manually searched and replaced the dates for now. |
Please do. I will include it in the next set of updates to the package. |
I’m currently a bit limited in time, so if anyone wants to go ahead, here are some examples from the German
|
Describe the bug
Script showing this error message:
`ValueError: time data '' does not match format '%A, %d %B %Y %I:%M:%S %p'
Additional context
Full results:
Notion page is found. Analyzing clippings file...
'ascii' codec can't encode characters in position 0-12: ordinal not in range(128)
Found 2543 notes and highlights.
× Passed 16 bookmarks or unsupported clippings.
Initiating transfer...
Traceback (most recent call last):
File "/opt/homebrew/bin/kindle2notion", line 8, in
sys.exit(main())
^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/kindle2notion/main.py", line 44, in main
export_to_notion(
File "/opt/homebrew/lib/python3.11/site-packages/kindle2notion/exporting.py", line 36, in export_to_notion
message = _add_book_to_notion(
^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/kindle2notion/exporting.py", line 90, in _add_book_to_notion
last_date = datetime.strptime(last_date, "%A, %d %B %Y %I:%M:%S %p")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/_strptime.py", line 349, in _strptime
raise ValueError("time data %r does not match format %r" %
ValueError: time data '' does not match format '%A, %d %B %Y %I:%M:%S %p'
The text was updated successfully, but these errors were encountered: