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

valueError: unkown file extension #1

Open
zzinzziny opened this issue Dec 2, 2022 · 3 comments
Open

valueError: unkown file extension #1

zzinzziny opened this issue Dec 2, 2022 · 3 comments

Comments

@zzinzziny
Copy link

zzinzziny commented Dec 2, 2022

Hi.
Thank you for opening code.
While I run this code, it appears error messages.
What happens?
What can I do to solve this situations?

File "/data/anaconda3/envs/imt_221125/lib/python3.8/site-packages/PIL/Image.py", line 2331, in save
format = EXTENSION[ext]
KeyError: ''

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "easyocr_translate.py", line 76, in
im_pil.save(OUT_PATH)
File "/data/anaconda3/envs/imt_221125/lib/python3.8/site-packages/PIL/Image.py", line 2333, in save
raise ValueError(f"unknown file extension: {ext}") from e
ValueError: unknown file extension:

@harikc456
Copy link
Owner

harikc456 commented Dec 2, 2022

Can you share how you are running the script?

@zzinzziny
Copy link
Author

I'm running easyocr_translate.py with this script.

python easyocr_translate.py --img_path /home/ubuntu/speech-bubble-extraction/image_kor/kor_1.png --out_path /home/ubuntu/speech-bubble-extraction/

@harikc456
Copy link
Owner

Ok, thanks for the reply. Can you try running the same script with the output file name? Something like this

python easyocr_translate.py --img_path /home/ubuntu/speech-bubble-extraction/image_kor/kor_1.png --out_path /home/ubuntu/speech-bubble-extraction/output.png

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

2 participants