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

Cannot Report Incorrect Captcha Result #96

Open
aflaldf opened this issue Jan 7, 2022 · 2 comments
Open

Cannot Report Incorrect Captcha Result #96

aflaldf opened this issue Jan 7, 2022 · 2 comments

Comments

@aflaldf
Copy link

aflaldf commented Jan 7, 2022

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

@ad-m
Copy link
Owner

ad-m commented Jan 7, 2022

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

@aflaldf
Copy link
Author

aflaldf commented Jan 7, 2022

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

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

2 participants