TypeError: 'encoding' is an invalid keyword argument for this function
jiezhan0214 opened this issue · comments
Jie Zhan commented
I ran the script and it gave me this error.
I guess it could be a compatibility issue?
The full error log is:
Traceback (most recent call last):
File "/usr/local/bin/arxiv_latex_cleaner", line 7, in <module>
from arxiv_latex_cleaner.__main__ import __main__
File "/Library/Python/2.7/site-packages/arxiv_latex_cleaner/__main__.py", line 91, in <module>
run_arxiv_cleaner(ARGS)
File "/Library/Python/2.7/site-packages/arxiv_latex_cleaner/arxiv_latex_cleaner.py", line 385, in run_arxiv_cleaner
splits['tex_in_root'] + splits['tex_not_in_root'], parameters)
File "/Library/Python/2.7/site-packages/arxiv_latex_cleaner/arxiv_latex_cleaner.py", line 166, in _read_all_tex_contents
os.path.join(parameters['input_folder'], fn))
File "/Library/Python/2.7/site-packages/arxiv_latex_cleaner/arxiv_latex_cleaner.py", line 158, in _read_file_content
with open(filename, 'r', encoding='utf-8') as fp:
TypeError: 'encoding' is an invalid keyword argument for this function
Jordi Pont-Tuset commented
Dear @jiezhan0214,
This tool is not compatible with Python 2, only with Python 3 (see README.md).
Best,