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

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

Open
hinlawrtai opened this issue Sep 25, 2024 · 2 comments

Comments

@hinlawrtai
Copy link

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
Copy link

aymiee commented Sep 27, 2024

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

@Miu-u
Copy link

Miu-u commented Oct 8, 2024

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

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

3 participants