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

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

Open
elislav opened this issue Dec 21, 2022 · 4 comments
Open

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

elislav opened this issue Dec 21, 2022 · 4 comments

Comments

@elislav
Copy link

elislav commented Dec 21, 2022

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'
@paperboi
Copy link
Owner

Hi, can you please post one clipping from your clippings file here? It could be that the date format in which it's stored in your device is different from the generic one I used.

@elislav
Copy link
Author

elislav commented Dec 23, 2022

That is a possible reason. My kindle is ancient :D
My Clippings.txt

@elislav
Copy link
Author

elislav commented Dec 26, 2022

FYI I have used the same file with a logseq plugin and it worked. Here is a link: https://github.com/theBenForce/logseq-plugin-my-highlights

@Yinkokotti
Copy link

I am having the same issue unfortunately, using the first Kindle device.

Attached an example of my clippings file.
My Clippings.txt

Any idea how I could solve this?

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

3 participants