'TwoCaptcha' object has no attribute 'normal'
Anyone help me?
from twocaptcha import TwoCaptcha
Probably you have another module with the same name installed.
Do the following:
import twocaptcha
print(twocaptcha.__version__)
print(dir(twocaptcha.TwoCaptcha))
and then show me the output please.
Hi, i am facing the same issue as well. Apparently, though "2captcha-python" is installed, each time it tries to run it will try to install the package name "TwoCaptcha". This is why the issue is being shown.
I faced this issue before on other packages like "websocket and websocket-client" and its very frustrating as there is a conflicting naming of package.
I tried doing the following but it still does not work as it still tries to install "TwoCaptcha" everytime i run the code. By the way, I am using replit to do it.
pip3 install 2captcha-python pip3 uninstall TwoCaptcha
import sys
from twocaptcha import TwoCaptcha
try:
solver = TwoCaptcha("<api key here>")
result = solver.normal("hello.jpg")
print(result)
except Exception as e:
sys.exit(e)
else:
sys.exit('solved: ' + str(result))
I'm having the same issue, mind ask how this is solved? So I uninstalled TwoCaptcha and installed captcha-python but this is what I get
from twocaptcha import TwoCaptcha ImportError: cannot import name 'TwoCaptcha' from 'twocaptcha' (unknown location)
This is my code
from twocaptcha import TwoCaptcha
import twocaptcha
print(twocaptcha.__version__)
print(dir(twocaptcha.TwoCaptcha))
Hello this worked for me, following the steps of this in Pypi https://pypi.org/project/2captcha-python/#installation
pip3 install 2captcha-python
from twocaptcha import TwoCaptcha
solver = TwoCaptcha(key_captcha)
result = solver.normal(file=...)
I tried to resolve click captchas on 2captcha website and via python, but both got timeout or error captcha unsolvable.. any fix? i'm using jpg screenshot of the captcha