You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got encoding errors when importing my highlights:
(kobo) C:\Users\mheesema>kh import
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Data\miniconda3\envs\kobo\Scripts\kh.exe\__main__.py", line 7, in <module>
File "C:\Data\miniconda3\envs\kobo\Lib\site-packages\typer\main.py", line 214, in __call__
return get_command(self)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Data\miniconda3\envs\kobo\Lib\site-packages\click\core.py", line 1130, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Data\miniconda3\envs\kobo\Lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Data\miniconda3\envs\kobo\Lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Data\miniconda3\envs\kobo\Lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Data\miniconda3\envs\kobo\Lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Data\miniconda3\envs\kobo\Lib\site-packages\typer\main.py", line 532, in wrapper
return callback(**use_params) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Data\miniconda3\envs\kobo\Lib\site-packages\kobo_highlights\main.py", line 152, in import_highlights
add_bookmark_to_md(bookmark, config.target_dir)
File "C:\Data\miniconda3\envs\kobo\Lib\site-packages\kobo_highlights\functions.py", line 290, in add_bookmark_to_md
md_filepath.write_text(text_new_file)
File "C:\Data\miniconda3\envs\kobo\Lib\pathlib.py", line 1079, in write_text
return f.write(data)
^^^^^^^^^^^^^
File "C:\Data\miniconda3\envs\kobo\Lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u0101' in position 42: character maps to <undefined>
Adding UTF-8 encoding to lines 286 and 290 in functions.py solved the problem for me:
I got encoding errors when importing my highlights:
Adding UTF-8 encoding to lines 286 and 290 in functions.py solved the problem for me:
The text was updated successfully, but these errors were encountered: