excalibur
excalibur copied to clipboard
'ascii' codec can't encode character
I tried to convert some tables in Polish govt doc, containing polish accented characters.
This failed with error: UnicodeEncodeError: 'ascii' codec can't encode character u'\u015a' in position 346: ordinal not in range(128)
The character in question is ś
, but there are way more such characters in that file.
If I need something reconfigured to be able to parse such chars, I believe it shouldn't raise an error, but rather suggest change :)
I can share the file if needed :)
Same here with ä
:
ERROR:root:'ascii' codec can't encode character u'\xe4' in position 258: ordinal not in range(128)
Traceback (most recent call last):
File "/home/maurus/.local/lib/python2.7/site-packages/excalibur/tasks.py", line 123, in extract tables.export(f_datapath, f=f, compress=True)
File "/home/maurus/.local/lib/python2.7/site-packages/camelot/core.py", line 701, in export self._write_file(f=f, **kwargs)
File "/home/maurus/.local/lib/python2.7/site-packages/camelot/core.py", line 659, in _write_file to_format(filepath)
File "/home/maurus/.local/lib/python2.7/site-packages/camelot/core.py", line 594, in to_html f.write(html_string)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 258: ordinal not in range(128)
Same here. Try to run under Python3. It works for me.