-
Notifications
You must be signed in to change notification settings - Fork 716
-
Notifications
You must be signed in to change notification settings - Fork 716
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
AttributeError: 'NoneType' object has no attribute 'group' #286
Comments
Came across this as well 👍🏻 |
Solution:
|
have not fixed yet |
I don't even know why it didn't work for you, but it helped me |
Any other solution guys please? |
Worked for me, thank you :) |
This comment has been minimized.
This comment has been minimized.
It solved the problem, but it doesn't translate anything now. |
I'm having the same issue as @dkbrz . If i run:
it is returning the original string - untranslated: '안녕하세요' |
Try "import googletrans" and "translator = googletrans.Translator()". It works in my case. |
Works for me 🥇 |
you need to check that others dependencies is compatible with your current version.
check your pip version, update if require then do: $ pip3 uninstall googletrans
$ pip3 install googletrans |
Hum..... the problem has not been solved yet. After reinstalling the library from latest version to 3.1.0a0, 'dest' parameter doesn't work. When you're trying to translate 'hello', despite selected destination langauge, you get the source text again.... |
It also solved my issue. Thanks |
When will the default pip3 branch default to this version? |
Same here. Any solutions to this, guys? |
Thanks for this, worked fine |
The issue is due to a failure followed by an invalid execution path that is not handled properly .. Ref: jtoken.py # in jtoken file (orig)
raw_tkk = self.RE_TKK.search(r.text)
if raw_tkk:
self.tkk = raw_tkk.group(1)
return
code = self.RE_TKK.search(r.text).group(1).replace('var ', '') # in jtoken file (modified)
raw_tkk = self.RE_TKK.search(r.text)
if raw_tkk:
self.tkk = raw_tkk.group(1)
return
# we already called search() so let's just use the result which is raw_tkk
code = raw_tkk.group(1).replace('var ', '') As it can be noticed from the above two, which logically are equal # raw_tkk is the result of calling self.RE_TKK.search(r.text)
raw_tkk = self.RE_TKK.search(r.text)
# If raw_tkk is valid, it return from the function as follow
if raw_tkk:
self.tkk = raw_tkk.group(1)
return
# If it is not valid, it does run
code = self.RE_TKK.search(r.text).group(1).replace('var ', '')
# which is equal to
code = raw_tkk.group(1).replace('var ', '')
# But we know we are there due to an invalid `raw_tkk`, and one cannot call `.group(1)` on an a NoneType `raw_tkk`. Furthermore, I dump the repose text Also related |
Does not resolve the issue even after installing version 3.1.0a0 |
It resolved my issue. Thanks. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
it's good for me |
I'm using one of the basic code:
And I'm getting an attribute error :
AttributeError: 'NoneType' object has no attribute 'group'
Please let me know if the module is still working properly.
The text was updated successfully, but these errors were encountered: