400 error on jobs request tables
Closed this issue · 4 comments
cab938 commented
$ courseraresearchexports jobs request tables --purpose=research --partner_short_name=umich
ERROR:root:Request to https://www.coursera.org/api/onDemandExports.v2/ with body:
{"exportType": "RESEARCH_WITH_SCHEMAS", "scope": {"typeName": "partnerContext", "definition": {"partnerId": {"maestroId": "3"}}}, "statementOfPurpose": "research", "anonymityLevel": "HASHED_IDS_WITH_ISOLATED_UGC_NO_PII", "schemaNames": ["demographics", "users", "course_membership", "course_progress", "feedback", "assessments", "course_grades", "peer_assignments", "discussions", "programming_assignments", "course_content"]}
received response:
{"errorCode":null,"message":"JSON didn't validate","details":{"/scope/partnerId/maestroId":[{"message":"error.expected.jsnumber","args":[]}],"/scope/typeName":[],"/scope":[{"message":"Invoked `unimplementedReads` for org.coursera.export.research.ExportScope","args":[]}]}}
Please contact data-support@coursera.org or #data-exports on Slack for assistance
ERROR:root:Problem when running command. Sorry!
Traceback (most recent call last):
File "/home/brooksch/.virtualenv/py2-dsmooc/local/lib/python2.7/site-packages/courseraresearchexports/main.py", line 86, in main
return args.func(args)
File "/home/brooksch/.virtualenv/py2-dsmooc/local/lib/python2.7/site-packages/courseraresearchexports/commands/jobs.py", line 74, in request_tables
export_request_with_metadata = api.post(export_request)[0]
File "/home/brooksch/.virtualenv/py2-dsmooc/local/lib/python2.7/site-packages/courseraresearchexports/models/utils.py", line 40, in response_transformer_wrapper
response.raise_for_status()
File "/home/brooksch/.virtualenv/py2-dsmooc/local/lib/python2.7/site-packages/requests/models.py", line 844, in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 400 Client Error: Bad Request for url: https://www.coursera.org/api/onDemandExports.v2/
python --version
Python 2.7.6
cab938 commented
I tried to identify the version of courseraresearchexports, but that failed:
[courseraresearchexports version
INFO:root:Your /home/brooksch/.virtualenv/py2-dsmooc/bin/courseraresearchexports's version is:
Please install this project with setup.py](url)
I did install this in a virtualenv through pip
timothyklee commented
Apologies, I submitted a pull request to fix this behavior #48. For now, could you try submitting with your partner_id?
courseraresearchexports jobs request tables --purpose=research --partner_id=3
cab938 commented
Same error but different root cause?
jobs request tables --purpose=research --partner_id=3
ERROR:root:Request to https://www.coursera.org/api/onDemandExports.v2/ with body:
{"exportType": "RESEARCH_WITH_SCHEMAS", "scope": {"typeName": "partnerContext", "definition": {"partnerId": {"maestroId": 3}}}, "statementOfPurpose": "research", "anonymityLevel": "HASHED_IDS_WITH_ISOLATED_UGC_NO_PII", "schemaNames": ["demographics", "users", "course_membership", "course_progress", "feedback", "assessments", "course_grades", "peer_assignments", "discussions", "programming_assignments", "course_content"]}
received response:
{"errorCode":null,"message":"Http transport exception during request: ClientFailure(reason: Error while making WSRequest., cause: java.util.concurrent.TimeoutException: Request timed out to /10.1.29.18:20034 of 5000 ms, retryable: false, origins: [dest -> iguazu][clientLabel -> /api/iguazuJobInvocations.v1]). Request: CREATE /api/iguazuJobInvocations.v1.","details":null}
Please contact data-support@coursera.org or #data-exports on Slack for assistance
ERROR:root:Problem when running command. Sorry!
Traceback (most recent call last):
File "/home/brooksch/.virtualenv/py2-dsmooc/local/lib/python2.7/site-packages/courseraresearchexports/main.py", line 86, in main
return args.func(args)
File "/home/brooksch/.virtualenv/py2-dsmooc/local/lib/python2.7/site-packages/courseraresearchexports/commands/jobs.py", line 74, in request_tables
export_request_with_metadata = api.post(export_request)[0]
File "/home/brooksch/.virtualenv/py2-dsmooc/local/lib/python2.7/site-packages/courseraresearchexports/models/utils.py", line 40, in response_transformer_wrapper
response.raise_for_status()
File "/home/brooksch/.virtualenv/py2-dsmooc/local/lib/python2.7/site-packages/requests/models.py", line 844, in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 400 Client Error: Bad Request for url: https://www.coursera.org/api/onDemandExports.v2/
timothyklee commented
Closing since I believe this is resolved now.