AttributeError: 'TwoCaptcha' object has no attribute 'normal'
I have both installed: twocaptcha and 2captcha-python the code:
from twocaptcha import TwoCaptcha
...
solver = TwoCaptcha(captchaKey) try: captcha = solver.normal("config/captcha_image.png") logging.info(f"Resultado 2captcha: {captcha}") return captcha except Exception as e: logging.error(f"Erro ao resolver o captcha automaticamente: {e}”)
i’ve also tried like:
captcha = solver.normal(file="config/captcha_image.png")
TwoCaptcha package is not the correct one, 2captcha-python is. It conflicts with the actual package when you installed both.
Uninstall the incorrect package with pip uninstall twocaptcha
If it doesn't get fixed, uninstall the correct package and install it again.
@micazev Good afternoon, try running the code using the python3 command. Example: python3 main.py Or use a virtual environment.
And please let me know the result.