[DRAFT] Fix the issue with unicode error#55
Draft
dawidwelna wants to merge 1 commit intopaperboi:masterfrom
Draft
[DRAFT] Fix the issue with unicode error#55dawidwelna wants to merge 1 commit intopaperboi:masterfrom
dawidwelna wants to merge 1 commit intopaperboi:masterfrom
Conversation
| @@ -0,0 +1,17 @@ | |||
| name: kindle2Notion | |||
Contributor
There was a problem hiding this comment.
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 |
Contributor
There was a problem hiding this comment.
So dependencies are now in both places - here and in requirements.txt file?
|
|
||
| # Gradle | ||
| .idea/**/gradle.xml | ||
| .idea/**/libraries |
Contributor
There was a problem hiding this comment.
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') |
Contributor
There was a problem hiding this comment.
Maybe you could print the exact error here?
adam-tokarski
suggested changes
Jul 13, 2021
| 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() |
Contributor
There was a problem hiding this comment.
I think you should provide test for such case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
relates to the discussion in this issue #54
I have yet tests to implement. But after quickly changing
reading.pyI am able to correctly import clippings which do have polish characters such as "ę", "ł", "ą"FYI @paperboi