What I'm doing wrong?
UANEMESIS opened this issue · 5 comments
My code(same as in example):
from captcha_solver import CaptchaSolver
solver = CaptchaSolver('browser')
raw_data = open('captcha.png', 'rb').read()
print(solver.solve_captcha(raw_data))
Result:
C:\Users\User\Desktop\GoFit>python extract.py Traceback (most recent call last): File "extract.py", line 5, in <module> print(solver.solve_captcha(raw_data)) File "C:\Program Files (x86)\Python36-32\lib\site-packages\captcha_solver\solv er.py", line 100, in solve_captcha ' Error: %s' % ex) UnboundLocalError: local variable 'ex' referenced before assignment
Note:
Image located in C:\Users\User\Desktop\GoFit\captcha.png
There was a bug: raised exception was being incorrectly processed and another exception (UnboundLocalError) was being raised. I've fixed that.
@lorien code from first post had same error, now it shows:
Traceback (most recent call last):
File "C:/code/captcha_test.py", line 4, in <module>
print(solver.solve_captcha(raw_data))
File "C:\venv\lib\site-packages\captcha_solver\solver.py", line 112, in solve_captcha
' Error: %s' % fail)
captcha_solver.error.SolutionTimeoutError: Service is not available. Error: <urlopen error [WinError 3] The system cannot find the path specified: ''>
same problem with gui backend
With full logging and prints enabled in source code:
DEBUG:captcha_solver:Submiting captcha
None
URL: file://C:\Users\ADMINI~1\AppData\Local\Temp\tmpgxlza8ts
None
DEBUG:captcha_solver:Submiting captcha
URL: file://C:\Users\ADMINI~1\AppData\Local\Temp\tmpw1zken7h
None
DEBUG:captcha_solver:Submiting captcha
URL: file://C:\Users\ADMINI~1\AppData\Local\Temp\tmp_2bp9ykt
None
DEBUG:captcha_solver:Submiting captcha
URL: file://C:\Users\ADMINI~1\AppData\Local\Temp\tmpkys74n21
None
DEBUG:captcha_solver:Submiting captcha
URL: file://C:\Users\ADMINI~1\AppData\Local\Temp\tmpoek0kbzn
None
DEBUG:captcha_solver:Submiting captcha
URL: file://C:\Users\ADMINI~1\AppData\Local\Temp\tmp4paaivan
DEBUG:captcha_solver:Submiting captcha
None
URL: file://C:\Users\ADMINI~1\AppData\Local\Temp\tmpohah6ecf
None
DEBUG:captcha_solver:Submiting captcha
URL: file://C:\Users\ADMINI~1\AppData\Local\Temp\tmpj6cwigql
DEBUG:captcha_solver:Submiting captcha
None
URL: file://C:\Users\ADMINI~1\AppData\Local\Temp\tmplur80578
DEBUG:captcha_solver:Submiting captcha
None
URL: file://C:\Users\ADMINI~1\AppData\Local\Temp\tmpgl17l4nt
Traceback (most recent call last):
File "C:/code/captcha_test.py", line 4, in <module>
print(solver.solve_captcha(raw_data))
File "C:\venv\lib\site-packages\captcha_solver\solver.py", line 112, in solve_captcha
' Error: %s' % fail)
captcha_solver.error.SolutionTimeoutError: Service is not available. Error: <urlopen error [WinError 3] The system cannot find the path specified: ''>
@EnzoRondo do not use one github issue to report defferent errors.