Comments (8)
Are you using a proxy?
This exception means that the challenge image was not downloaded successfully because of network fluctuations, so when executing to the later operations, the prompt FileNotFoundError
pop up (cannot find the challenge image).
from hcaptcha-challenger.
Dont use proxy , i try in my computer and server and have the same problem .
from hcaptcha-challenger.
Maybe you should provide more information - like chrome version or something otherwise I would never have guessed the problem.
from hcaptcha-challenger.
My version chrome is : 101.0.4951.54
I did git clone , went to the directory installed everything and then tried to run the script and had this problem above
Information for aiohttp:
\hcaptcha2>pip install aiohttp
Requirement already satisfied: aiohttp in c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages (3.8.1)
Requirement already satisfied: frozenlist>=1.1.1 in c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages (from aiohttp) (1.3.0)
Requirement already satisfied: attrs>=17.3.0 in c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages (from aiohttp) (21.4.0)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages (from aiohttp) (4.0.2)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages (from aiohttp) (5.2.0)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages (from aiohttp) (2.0.4)
Requirement already satisfied: aiosignal>=1.1.2 in c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages (from aiohttp) (1.2.0)
Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages (from aiohttp) (1.7.2)
Requirement already satisfied: idna>=2.0 in c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages (from yarl<2.0,>=1.0->aiohttp) (3.2)
from hcaptcha-challenger.
I suddenly realized that this was an interesting question.
from hcaptcha-challenger.
Hello ,, update version for python 3,10 and now work better , but sometimes have this, I think it's the Challenge that has changed
Note : Run in my server without proxy
C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src>py -3.10 main.py demo --lang=en
2022-05-06 17:59:26 | INFO - Starting demo project...
2022-05-06 17:59:28 | DEBUG - 🎮 Activate challenger context
2022-05-06 17:59:31 | DEBUG - >> Challenge [ArmorCaptcha] Handle hCaptcha checkbox
2022-05-06 17:59:32 | DEBUG - >> Challenge [ArmorCaptcha] Get label - label=「motorbus」
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<AshFramework.launcher() done, defined at C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\utils\accelerator\core.py:49> exception=ClientConnectorError(ConnectionKey(host='imgs.hcaptcha.com', port=443, is_ssl=True, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))>
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\connector.py", line 986, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1089, in create_connection
transport, protocol = await self._create_connection_transport(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1119, in _create_connection_transport
await waiter
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\selector_events.py", line 853, in _read_ready__data_received
data = self._sock.recv(self.max_size)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\utils\accelerator\core.py", line 53, in launcher
await self.control_driver(context, session=session)
File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\hcaptcha_challenger\core.py", line 272, in control_driver
async with session.get(url) as response:
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\client.py", line 1138, in __aenter__
self._resp = await self._coro
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\client.py", line 535, in _request
conn = await self._connector.connect(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\connector.py", line 542, in connect
proto = await self._create_connection(req, traces, timeout)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\connector.py", line 907, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\connector.py", line 1206, in _create_direct_connection
raise last_exc
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\connector.py", line 992, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host imgs.hcaptcha.com:443 ssl:default [An existing connection was forcibly closed by the remote host]
2022-05-06 17:59:33 | DEBUG - >> Challenge [ArmorCaptcha] Download the challenge image
[EXIT] Press any key to exit...
2022-05-06 17:59:34 | ERROR - An error has been caught in function 'demo', process 'MainProcess' (10176), thread 'MainThread' (6308):
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\main.py", line 11, in <module>
Fire(Scaffold)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\fire\core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\fire\core.py", line 466, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\fire\core.py", line 681, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
> File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\scaffold.py", line 54, in demo
challenge.runner(
File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\apis\scaffold\challenge.py", line 50, in runner
resp = challenger.anti_hcaptcha(ctx, dir_model=DIR_MODEL, onnx_prefix=onnx_prefix)
File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\hcaptcha_challenger\core.py", line 503, in anti_hcaptcha
self.challenge(ctx, model=model)
File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\hcaptcha_challenger\core.py", line 320, in challenge
with open(img_filepath, "rb") as file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Administrator\\Desktop\\hcaptcha2\\hcaptcha-challenger\\src\\database\\temp_cache\\_challenge\\1651856373_bus\\Challenge Image 2.png'
from hcaptcha-challenger.
Update - I try now and work good in OSX but windows have the error
from hcaptcha-challenger.
你用的是最新的代码吗?还是过期的。
from hcaptcha-challenger.
Related Issues (20)
- [Challenge] Please click each image containing a pirate ship HOT 1
- [Challenge] [retrain] please click on the most similar object to the following reference shape
- [Challenge] [retrain] Please click on the object that appears only once
- feat(components): zero-shot object detection
- feat(control): nested CLIP candidates
- Can you give me an example code on using hcaptcha-challenger with selenium
- [Question] The project is failing 90% of the time because of new challenges HOT 15
- [Challenge] Please find and click on the letter K/W in the image below.
- [Challenge] Pleasae click at the star
- [Challenge] Please click each image containing a bumblebee
- Browserless Challenges HOT 1
- Solved
- google colab error
- url 'https://api.hcaptcha.com/getcaptcha/' returning base64 instead json HOT 7
- bug: workflow post-action
- feat(new-order): Integrated with LVM (large visual models) HOT 1
- [Challenge]
- feat(cloudflare-edge-node): FastAPI Python Workers
- feat(schema): Estimate Bottle Orientation with Computer Vision
- Solving captcha on queries
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hcaptcha-challenger.