Xewdy444 / Playwright-reCAPTCHA

A Python library for solving reCAPTCHA v2 and v3 with Playwright
https://pypi.org/project/playwright-recaptcha/
MIT License
240 stars 33 forks source link

problem with greenlet on Win10 #16

Closed rastarr closed 1 year ago

rastarr commented 1 year ago

trying to get the test script to run on Windows 10 but getting an error with greenlet

C:\Users\rasta\Documents>python solve_capv3.py Traceback (most recent call last): File "C:\Users\rasta\Documents\solve_capv3.py", line 2, in <module> from playwright_recaptcha import recaptchav3 File "C:\Users\rasta\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright_recaptcha\__init__.py", line 10, in <module> from playwright_recaptcha.recaptchav2.async_solver import AsyncSolver as AsyncSolverV2 File "C:\Users\rasta\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright_recaptcha\recaptchav2\__init__.py", line 2, in <module> from playwright_recaptcha.recaptchav2.async_solver import AsyncSolver File "C:\Users\rasta\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright_recaptcha\recaptchav2\async_solver.py", line 14, in <module> from playwright.async_api import Page, Response File "C:\Users\rasta\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright\async_api\__init__.py", line 25, in <module> import playwright.async_api._generated File "C:\Users\rasta\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright\async_api\_generated.py", line 25, in <module> from playwright._impl._accessibility import Accessibility as AccessibilityImpl File "C:\Users\rasta\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright\_impl\_accessibility.py", line 17, in <module> from playwright._impl._connection import Channel File "C:\Users\rasta\AppData\Local\Programs\Python\Python311\Lib\site-packages\playwright\_impl\_connection.py", line 23, in <module> from greenlet import greenlet File "C:\Users\rasta\AppData\Local\Programs\Python\Python311\Lib\site-packages\greenlet\__init__.py", line 29, in <module> from ._greenlet import _C_API # pylint:disable=no-name-in-module ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: DLL load failed while importing _greenlet: The specified module could not be found.

For the life of me, I can't see why there's an issue. This is a fresh Python 3.11.2 install. all the dependencies look correct including greenlet 2.0.1

Has this been tested on Windows 10 by anyone?

rastarr commented 1 year ago

from https://github.com/python-greenlet/greenlet/issues/346 seems this is solved by pip install msvc-runtime

Xewdy444 commented 1 year ago

That is odd. I run all of the tests on Windows 10 and have never encountered this issue. I'm glad you found the solution though.