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

Gradio has a conflict with Python file cp1252 #8316

Closed
1 task done
MichelangeloAmorusoManzari opened this issue May 17, 2024 · 3 comments
Closed
1 task done

Gradio has a conflict with Python file cp1252 #8316

MichelangeloAmorusoManzari opened this issue May 17, 2024 · 3 comments
Labels
bug Something isn't working needs repro Awaiting full reproduction

Comments

@MichelangeloAmorusoManzari

Describe the bug

When running gradio file.py, the code compiles. When opening the provided link for the gradio interface, the code crashes, giving the following error:

  File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 309911: character maps to <undefine>

After hours of trial and error, switching Python versions, using a new virtual environment, changing gradio version and more, I found a temporary solution: comment the code of file: cp1252.

This solves the issue for now.

Regarding the error I found that "0x8f" is part of the charmap of Python, but it's an undefined character, I cannot find more information on what is triggering this error.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

I cannot share the code as it is under NDA unfortunately, I know you will hate me, but I'm just showing an issue.

Screenshot

No response

Logs

No response

System Info

Gradio 4.31.3

Python 3.8 or 3.11 gave the same error.

Severity

I can work around it

@MichelangeloAmorusoManzari MichelangeloAmorusoManzari added the bug Something isn't working label May 17, 2024
@abidlabs
Copy link
Member

abidlabs commented May 17, 2024

Can you please provide a minimal repro with code @MichelangeloAmorusoManzari? See: https://stackoverflow.com/help/minimal-reproducible-example

@abidlabs abidlabs added the needs repro Awaiting full reproduction label May 17, 2024
@MichelangeloAmorusoManzari
Copy link
Author

Hello, I cannot for an NDA agreement.

The versions of gradio and Python on Windows 11 made me reproduce this problem.

@abidlabs
Copy link
Member

Hi @MichelangeloAmorusoManzari you don't need to share proprietary code but we'll need some sort of minimal example that produces this error, otherwise we are not sure if it's a gradio issue or something else in your code. I'll close this for now, until we have a suitable repro.

@abidlabs abidlabs closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs repro Awaiting full reproduction
Projects
None yet
Development

No branches or pull requests

2 participants