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

NameError: name 'url' is not defined #381

Closed
dawidadach opened this issue Jan 5, 2023 · 4 comments
Closed

NameError: name 'url' is not defined #381

dawidadach opened this issue Jan 5, 2023 · 4 comments

Comments

@dawidadach
Copy link

While trying to update language models I am getting error as below:

PS G:\Workspace\Working\JS\translator\api> python install_models.py
Updating language models
Found 58 models
Downloading Arabic → English (1.0) ...
Downloading Azerbaijani → English (1.5) ...
Downloading Catalan → English (1.7) ...
Downloading Chinese → English (1.7) ...
(<HTTPError 403: 'Forbidden'>,)
(<HTTPError 403: 'Forbidden'>,)
(<HTTPError 403: 'Forbidden'>,)
(<HTTPError 403: 'Forbidden'>,)
Traceback (most recent call last):
  File "G:\Workspace\Working\JS\translator\api\install_models.py", line 12, in <module>
    check_and_install_models(force=True, load_only_lang_codes=lang_codes)
  File "G:\Workspace\Working\JS\translator\api\libretranslate\init.py", line 52, in check_and_install_models
    download_path = available_package.download()
  File "C:\Users\MDB\AppData\Local\Programs\Python\Python39\lib\site-packages\argostranslate\package.py", line 217, in download
    raise Exception(f"Download failed for {url}")
NameError: name 'url' is not defined
PS G:\Workspace\Working\JS\translator\api> 

It's been failing like this since first run. Running on Windows 11 , Python 3.9.0

@TimIgoe
Copy link

TimIgoe commented Jan 6, 2023

Seeing exactly the same, Python 3.9 from a Centos 8 host.

@TimIgoe
Copy link

TimIgoe commented Jan 6, 2023

So, taking from github and running then - works, taking from pip - fails.

@pierotofy
Copy link
Member

I wonder if this was fixed in main by updating the latest argos-translate. I've just released 1.3.8 (https://github.com/LibreTranslate/LibreTranslate/releases/tag/v1.3.8) which should be available on pypi soon. Try to reinstall with pip and see if the issue persists? 🙏

@TimIgoe
Copy link

TimIgoe commented Jan 6, 2023

Yep, that seems to have fixed it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants