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

get_file_encoding error #88

Open
rotcx opened this issue Dec 24, 2023 · 0 comments
Open

get_file_encoding error #88

rotcx opened this issue Dec 24, 2023 · 0 comments

Comments

@rotcx
Copy link

rotcx commented Dec 24, 2023

arxiv number: 1612.02523
temporary directory /var/folders/xz/b53crnzx71j3q8q7fh6qch400000gp/T/tmpmt9nyn04
This is a pure text file
main tex files found:
Traceback (most recent call last):
File "/usr/local/bin/translate_arxiv", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/mathtranslate/translate_arxiv.py", line 221, in main
raise e
File "/usr/local/lib/python3.7/site-packages/mathtranslate/translate_arxiv.py", line 211, in main
success = translate_dir('.', options)
File "/usr/local/lib/python3.7/site-packages/mathtranslate/translate_arxiv.py", line 111, in translate_dir
content = open(path, encoding=input_encoding).read()
File "/usr/local/Cellar/[email protected]/3.7.12/Frameworks/Python.framework/Versions/3.7/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 67479: invalid start byte


arxiv number: 1612.02523
temporary directory /var/folders/xz/b53crnzx71j3q8q7fh6qch400000gp/T/tmpwz89rjiv
download completed...
This is a pure text file
main tex files found:
Traceback (most recent call last):
File "/usr/local/bin/translate_arxiv", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/mathtranslate/translate_arxiv.py", line 221, in main
raise e
File "/usr/local/lib/python3.7/site-packages/mathtranslate/translate_arxiv.py", line 211, in main
success = translate_dir('.', options)
File "/usr/local/lib/python3.7/site-packages/mathtranslate/translate_arxiv.py", line 110, in translate_dir
input_encoding = get_file_encoding(path)
File "/usr/local/lib/python3.7/site-packages/mathtranslate/encoding.py", line 21, in get_file_encoding
if result['confidence'] < 0.9:
TypeError: '<' not supported between instances of 'NoneType' and 'float'

image

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

1 participant