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

ERROR:root:'charmap' codec can't encode character '\ufffd' in position 575: character maps to <undefined> #505

Open
cahe opened this issue Jul 10, 2024 · 2 comments

Comments

@cahe
Copy link

cahe commented Jul 10, 2024

Trying to exctact tables from PDF. Used autodetect or manually selected one table with default settings.

Getting error:

127.0.0.1 - - [10/Jul/2024 13:45:08] "GET /jobs/cdb8872a-ee4c-44e5-8ae6-4d5c3f9500f5 HTTP/1.1" 200 -
ERROR:root:'charmap' codec can't encode character '\ufffd' in position 575: character maps to <undefined>
Traceback (most recent call last):
  File "excalibur\executors\sequential_executor.py", line 12, in execute_command
  File "subprocess.py", line 359, in check_call
  File "subprocess.py", line 340, in call
  File "subprocess.py", line 854, in __init__
  File "subprocess.py", line 1307, in _execute_child
FileNotFoundError: [WinError 2] Nie można odnaleźć określonego pliku

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "excalibur\tasks.py", line 136, in extract
  File "site-packages\camelot\core.py", line 732, in export
  File "site-packages\camelot\core.py", line 696, in _write_file
  File "site-packages\camelot\core.py", line 635, in to_html
  File "c:\hostedtoolcache\windows\python\3.8.3\x64\lib\encodings\cp1250.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode character '\ufffd' in position 575: character maps to <undefined>
127.0.0.1 - - [10/Jul/2024 13:45:08] "GET /jobs/cdb8872a-ee4c-44e5-8ae6-4d5c3f9500f5 HTTP/1.1" 200 -

PDF attached. Tried pages 11-13.
4e-profiles.pdf

@cahe
Copy link
Author

cahe commented Jul 10, 2024

Using x64 windows executable from excalibur-windows-latest-x64.zip (downloaded today), with gs10031w64.exe

@bosd
Copy link

bosd commented Aug 8, 2024

I think you need to set the destination encoding.
with an environment varaible
PYTHONIOENCODING: "utf8"

anyway..
This repo seems to be no longer maintained.
We try to build a maintained fork at pypdf_table_extraction.

You are welcome to check it out and contribute there.

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

No branches or pull requests

2 participants