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
Language Detection Not Working (HTTP Error 503: Service Unavailable) #137
Comments
from textblob import TextBlob It shows: |
Same issue on Python 3 with a simple translate, it always throws error 503, since approximately 2 days. It has worked just fine before.
|
@Sickness-chan "since approximately 2 days. It has worked just fine before." Same for me. |
Same here. It seems that google translation uses a token (called tk) generated in javascript to avoid bypasses in its calls. I saw that there is a function in translate.py (_calculate_tk) that calculates it. I guess that that function should be updated, but I still didn't figure out how. I hope that this points someone in the right direction. |
Any update on this? |
I'm experiencing this same problem since 4 or 5 days ago. |
Somehow fixed it. Not sure its a solution or workaround :D I just started fighting with it and made few changes in translate.py (/python/dist-packages/textblob/) Change List (PFA translate.py.txt):
Tested with Python 2.7.6, Ubuntu 14.04, TextBlob 0.11.1
Note: Changes made in existing code file is just to share a workable solution to the reported issue. It is shared by and as an individual; not from the owner or community. |
@manurajhada Would you be so kind as to send a PR with your fix? |
Its working for small text only, for large paragraph google response is "Your client has issued a malformed or illegal request." |
Porting the code to requests cannot be very significant to the fix as requests uses urllib itself. They must have changed something to the The repo for gTTS-token hasn't been updated since June so it won't be enough, assuming they indeed changed the code. Let's hope that someone can understand the new algorithm. |
Any update on this issue ? Getting the same while using textblob. |
Seems like all the modules which internally uses the Google Translation APIs are having the same problem. I have tried goslate and same error. |
Yep, same problem here.. I've also tried other modules and they are all replying error 503 :-\ |
I've submitted PR #139, which works for me most of the time, but I still get some 503's. Let me know if it works for you. |
Affects me too, I learn traducing first to english (from spanish) now the learn databases are corrupted because the latest thing learned come from text in spanish, not traduced. I deploy my app and install TextBlob egg from pypi |
It seems that this is still broken. I was getting this error in HangoutsBot, so I setup a virtualenv to test TextBlob specifically and I'm seeing the same 503 error. :( |
up! |
any API that uses Google as service will get 503! it's the same for others such as Goslate. It turns out that now you have to pay (https://cloud.google.com/translate/v2/pricing). Once they get your IP, it's done |
Same issue here. I switched to https://github.com/Mimino666/langdetect , which seems to work. |
This has been fixed in #148 . I will cut a release shortly. |
from textblob import TextBlob
txt = u"Test Language Detection"
b = TextBlob(txt)
b.detect_language()
It is giving "HTTPError: HTTP Error 503: Service Unavailable"
Python Version: 2.7.6
TextBlob Version: 0.11.1
OS: Ubuntu 14.04 LTS & CentOS 6.8
The text was updated successfully, but these errors were encountered: