-
Notifications
You must be signed in to change notification settings - Fork 114
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: 'str' object has no attribute 'removeprefix' #27
Comments
I found your answer to other issue and upgraded Python to 3.9. Any help? Thanks. |
Hi, can you try posting the last book that appeared in your output before this error showed up? It may something to do with a book not having an author listed at all. |
I have the same problem and I have no books showing on my output. (is there a "verbose" option I should be using to get this info?) Many books in my Clippings file don't follow a "Last, First" author structure. Hope that helps. |
@paperboi setup.py
|
Noted. Will address it in the next commit and release. |
I realized I haven't fully taken into account of the non-ASCII characters that sometimes appear when reading the clippings file in UTF-8 encoding. I assume this error came up because of it. Found a solution to this- will post a new release soon and update you here. |
Hi man, thanks for the reply. |
Hi, can you update to the new release and run the commands again? It should work now. |
Works like a charm, thank you! Will buy you a coffee for this, thanks! |
@madzic Glad to hear that! Thanks a lot! |
Hey man, love the idea, this is what I was looking for for a long time.
Encountering this issue when trying to run the module:
Traceback (most recent call last):
File "D:\Python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "D:\Python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "D:\Python38\lib\site-packages\kindle2notion_main.py", line 31, in
main()
File "D:\Python38\lib\site-packages\click\core.py", line 1134, in call
return self.main(*args, **kwargs)
File "D:\Python38\lib\site-packages\click\core.py", line 1059, in main
rv = self.invoke(ctx)
File "D:\Python38\lib\site-packages\click\core.py", line 1401, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "D:\Python38\lib\site-packages\click\core.py", line 767, in invoke
return _callback(*args, **kwargs)
File "D:\Python38\lib\site-packages\kindle2notion_main.py", line 25, in main
books = parse_raw_clippings_text(all_clippings)
File "D:\Python38\lib\site-packages\kindle2notion\parsing.py", line 18, in parse_raw_clippings_text
author, title = _parse_author_and_title(raw_clipping_list)
File "D:\Python38\lib\site-packages\kindle2notion\parsing.py", line 35, in _parse_author_and_title
author, title = _parse_raw_author_and_title(raw_clipping_list)
File "D:\Python38\lib\site-packages\kindle2notion\parsing.py", line 69, in _parse_raw_author_and_title
author = author.removeprefix('(').removesuffix(')')
AttributeError: 'str' object has no attribute 'removeprefix'
Any help? Thanks.
The text was updated successfully, but these errors were encountered: