Skip to content

AttributeError: 'NoneType' object has no attribute 'strftime' #85

@elislav

Description

@elislav

Hi! This is my first issue report, if I have missed something, just let me know.

I am on mac (m1 macbook air) and have installed the latest version of the repo and python. When I updated python with homebrew I received the following:

Warning: You are using macOS 13.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
pre-release version.


Warning: Ruby version 2.6.10 is unsupported on macOS 13. Homebrew
is developed and tested on Ruby 2.6.9, and may not work correctly
on other Rubies. Patches are accepted as long as they don't cause breakage
on supported Rubies.

Here is what I get when I try to sync the hightlights:

Notion page is found. Analyzing clippings file...
Found 2 notes and highlights.
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/bin/kindle2notion", line 33, in <module>
    sys.exit(load_entry_point('kindle2notion==1.0.1', 'console_scripts', 'kindle2notion')())
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kindle2notion/__main__.py", line 41, in main
    all_books = parse_raw_clippings_text(all_clippings)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kindle2notion/parsing.py", line 96, in parse_raw_clippings_text
    page, location, date, isNote = _parse_page_location_date_and_note(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kindle2notion/parsing.py", line 144, in _parse_page_location_date_and_note
    date = date.strftime("%A, %d %B %Y %I:%M:%S %p")
AttributeError: 'NoneType' object has no attribute 'strftime'

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