Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Код падает если картинка не погрузилась #10

Open
SlowMotion241 opened this issue Oct 9, 2023 · 0 comments

Comments

@SlowMotion241
Copy link

Вот такая ошибка возникает:

solved accuracy(=0.1688) < miniumum(=0.4). Trying again. Solved accuracy(=0.1157) < miniumum(=0.4). Trying again. Traceback (most recent call last): File "/Users/Documents/Python/vk_captcha/main.py", line 38, in <module> asyncio.run(captcha_solver()) File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/Users/Documents/Python/vk_captcha/main.py", line 35, in captcha_solver answer, accuracy = await solver.solve_async(url=url, minimum_accuracy=0.4, repeat_count=10) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/vk_captcha/solver.py", line 146, in solve_async answer, accuracy = next(iter(completed)).result() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/vk_captcha/solver.py", line 156, in _solve_task img: "np.ndarray" = img.astype(np.float32) / 255. ^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'astype'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant