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

show error message in case the author_name is not present #26

Merged
merged 1 commit into from
May 22, 2021

Conversation

rahulakrishna
Copy link
Contributor

  • Adds a check for author name and shows error message but continues
    execution with empty author name

Resolves: #25

* Adds a check for author name and shows error message but continues 
execution with empty author name

Resolves: paperboi#25
@paperboi paperboi merged commit de3716e into paperboi:master May 22, 2021
@Mohan-cloud
Copy link

Apologies if this is not the right place to comment this. Running this latest commit produces the following error for me.

No author was found in clippings file. You can manually edit your clippings file to add Author in the format: <Title: (Lastname, Firstname)>. For now continuing with empty author name
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/abc/Documents/projects/kindle2notion/kindle2notion/main.py", line 31, in
main()
File "/home/abc/.local/share/virtualenvs/kindle2notion-bDmVw8vi/lib/python3.9/site-packages/click/core.py", line 1134, in call
return self.main(*args, **kwargs)
File "/home/abc/.local/share/virtualenvs/kindle2notion-bDmVw8vi/lib/python3.9/site-packages/click/core.py", line 1059, in main
rv = self.invoke(ctx)
File "/home/abc/.local/share/virtualenvs/kindle2notion-bDmVw8vi/lib/python3.9/site-packages/click/core.py", line 1401, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/abc/.local/share/virtualenvs/kindle2notion-bDmVw8vi/lib/python3.9/site-packages/click/core.py", line 767, in invoke
return __callback(*args, **kwargs)
File "/home/abc/Documents/projects/kindle2notion/kindle2notion/main.py", line 25, in main
books = parse_raw_clippings_text(all_clippings)
File "/home/abc/Documents/projects/kindle2notion/kindle2notion/parsing.py", line 18, in parse_raw_clippings_text
author, title = _parse_author_and_title(raw_clipping_list)
File "/home/abc/Documents/projects/kindle2notion/kindle2notion/parsing.py", line 36, in _parse_author_and_title
author, title = _deal_with_exceptions_in_author_name(author, title)
File "/home/abc/Documents/projects/kindle2notion/kindle2notion/parsing.py", line 84, in _deal_with_exceptions_in_author_name
last_name, first_name = author.split(', ')
ValueError: too many values to unpack (expected 2)

paperboi added a commit that referenced this pull request May 25, 2021
paperboi added a commit that referenced this pull request May 25, 2021
paperboi added a commit that referenced this pull request May 25, 2021
paperboi added a commit that referenced this pull request May 25, 2021
adam-tokarski added a commit to adam-tokarski/kindle2notion that referenced this pull request May 31, 2021
Thus, fixes failing tests. Author was not correctly removed from title due paperboi#26.
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

Successfully merging this pull request may close these issues.

Code fails when Author information isn't present in the clippings file
3 participants