-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
"Download failed" Error #380
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tl;dr:
Elaborated:
I tried copying the example code for Python, supplied in the main GitHub page:
and now I get an error: "Download failed for English → Spanish."
I tried to debug it, and it seems that there is a strange behavior when attempting to install the language package:
When I looked at this line:
argostranslate.package.install_from_path(package_to_install.download())
and then inside the 'download()' method, I saw that the method tries to find a path 'filepath' to the en->es package:
and it didn't find this 'filepath', and so it calls the 'get_from' method to download the data:
data = networking.get_from(self.links)
yet it returned data = None, and that's what raised the error.
I then looked into the 'get_from' method, where it seems to attempt downloading the missing en->es package from the links supplied in the arguments, and it somehow fails to do that by its own. However, when I open the "https://..." link in my browser , the browser succeeds to install the package (in my user downloads folder...). So it is not clear why the package couldn't be installed automatically at the first place.
That is my main problem, as it prevents even the sample script from working, but further investigation reveals another problem:
When I looked at the name of the downloaded package, it was: 'translate-en_es-1_0.argosmodel', but looking back at the filename that the 'download()' method tried to find, it was directed to a package named 'translate-en_es.argosmodel' - so even after downloading the package to the right folder, the 'filepath' won't be found, as the downloaded package's name is different than the searched one. From what I understand this lead to installing the package every time the function is called, even if there is a relevant package already installed (but with an unexpected name to the script).
The text was updated successfully, but these errors were encountered: