python-anticaptcha icon indicating copy to clipboard operation
python-anticaptcha copied to clipboard

Cannot Report Incorrect Captcha Result

Open aflaldf opened this issue 3 years ago • 2 comments

raise AnticaptchaException(
python_anticaptcha.exceptions.AnticaptchaException: [ERROR_NO_SUCH_CAPCHA_ID:16]Task you are requesting does not exist in your current task list or has been expired. Could not find appropriate task, make sure it had no errors and you have not reported it yet.

getting this whenever I try to report an incorrect captcha response, even before 60 seconds of task creation. please help

aflaldf avatar Jan 07 '22 05:01 aflaldf

Could you provide any snippet to attempt to reproduce your issue?

ad-m avatar Jan 07 '22 06:01 ad-m

I am trying to test the reporting

import passwords
from python_anticaptcha import AnticaptchaClient, ImageToTextTask, AnticatpchaException

def setImg_getCaptcha(captcha):
        #anticaptcha service 
        api_key = passwords.apikey_anticaptcha
        captcha_fp = open(captcha, 'rb')
        client = AnticaptchaClient(api_key)
        task = ImageToTextTask(captcha_fp)
        job = client.createTask(task)
        task_id=job.task_id
        job.join()
        return job.get_captcha_text(),task_id
def report_incorrect_captcha(task_id):
        api_key = passwords.apikey_anticaptcha
        client=AnticaptchaClient(api_key)
        print('***')
        print(task_id)
        res=client.reportIncorrectRecaptcha(task_id)
        print('***',res)

captcha=CAPTCHA_IMAGE_PATH       
result,task_id=setImg_getCaptcha(captcha)
print(result)
if result!=CORRECT_CAPTCHA_TEXT:
    report_incorrect_captcha(task_id)

For the captcha type I am trying to solve by anticaptcha I am getting so many incorrect results

aflaldf avatar Jan 07 '22 08:01 aflaldf