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: large.bin has wrong file format! #155

Open
eu9ene opened this issue Apr 17, 2024 · 0 comments
Open

ValueError: large.bin has wrong file format! #155

eu9ene opened this issue Apr 17, 2024 · 0 comments

Comments

@eu9ene
Copy link

eu9ene commented Apr 17, 2024

FastText model downloading fails quite often, especially when using the "large" model.

A workaround is to pre-download the model with wget:

filters_dir="/builds/worker/.local/lib/python3.10/site-packages/opuscleaner/filters"
wget -O "${filters_dir}/large.bin" https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin

I think requests.get is not robust enough without retries, so it just fails periodically and wget does a lot more to ensure reliable downloading.

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

1 participant