2captcha / 2captcha-python

Python 3 package for easy integration with the API of 2captcha captcha solving service to bypass recaptcha, hcaptcha, сloudflare turnstile, funcaptcha, geetest and solve any other captchas.
https://pypi.org/project/2captcha-python
MIT License
550 stars 92 forks source link

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

Closed micazev closed 1 month ago

micazev commented 10 months ago

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

ethmtrgt commented 9 months ago

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.

poplers24 commented 4 months ago

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