2captcha-python icon indicating copy to clipboard operation
2captcha-python copied to clipboard

AttributeError: 'TwoCaptcha' object has no attribute 'normal'

Open micazev opened this issue 2 years ago • 2 comments

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")

micazev avatar Dec 21 '23 21:12 micazev

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.

ethmtrgt avatar Feb 01 '24 10:02 ethmtrgt

@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.

poplers24 avatar Jun 11 '24 11:06 poplers24