lamm-mit / PDF2Audio

Apache License 2.0
1.09k stars 138 forks source link

Encountering SyntaxError message when running the last command from the instruction #7

Open hinlawrtai opened 1 month ago

hinlawrtai commented 1 month ago

After following the instruction, and when I type the last command "python app.py", it generates the following error: SyntaxError: Non-UTF-8 code starting with '\xe0' in file C:\Users\hinla\Downloads\PDF2Audio\app.py on line 370, but no encoding declared; see https://python.org/dev/peps/pep-0263/ for details

Thank you.

aymiee commented 1 month ago

I came across this same error and placed the above before all lines and it appears to be working: # -*- coding: utf-8 -*-

Miu-u commented 1 month ago

I came across this same error and placed the above before all lines and it appears to be working: # -*- coding: utf-8 -*-

I use it in app.py file, but it doesn't work. It generates the following error: Traceback (most recent call last): File "C:\Users\newga\PDF2Audio\app.py", line 877, in gr.Markdown(read_readme()) File "C:\Users\newga\PDF2Audio\app.py", line 26, in read_readme content = file.read() UnicodeDecodeError: 'gbk' codec can't decode byte 0xa4 in position 2608: illegal multibyte sequence