-
Notifications
You must be signed in to change notification settings - Fork 120
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
[DRAFT] Fix the issue with unicode error #55
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,17 @@ | |||
name: kindle2Notion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this file for? Seems like some conda
stuff. If @paperboi is ok with that, please add some documentation about that, preferably to readme file.
- flake8>=3.9.2 | ||
- pytest>=6.2.4 | ||
- pytest-cov>=2.12.0 | ||
- black>=21.5b2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So dependencies are now in both places - here and in requirements.txt
file?
|
||
# Gradle | ||
.idea/**/gradle.xml | ||
.idea/**/libraries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just .idea/
? It should do the job. Why do you need to specify these all items additionally?
raw_clippings_text = open(clippings_file_path, "r", encoding="utf-8-sig").read() | ||
raw_clippings_text = raw_clippings_text.encode("ascii").decode() | ||
except UnicodeEncodeError: | ||
print('UnicodeEncodeError, encoding data with utf-8') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you could print the exact error here?
except UnicodeEncodeError: | ||
print('UnicodeEncodeError, encoding data with utf-8') | ||
raw_clippings_text = open(clippings_file_path, "r", encoding="utf-8").read() | ||
raw_clippings_text = raw_clippings_text.encode("UTF8").decode() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should provide test for such case.
relates to the discussion in this issue #54
I have yet tests to implement. But after quickly changing
reading.py
I am able to correctly import clippings which do have polish characters such as "ę", "ł", "ą"FYI @paperboi