Skip to content

ValueError: time data '' does not match format '%A, %d %B %Y %I:%M:%S %p' #98

Open
@Krystalqx

Description

@Krystalqx

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions