Spaces:
Runtime error
Runtime error
Tristan Thrush
commited on
Commit
·
7ed08ed
1
Parent(s):
8c01c8d
fixed typo in assignment id getter
Browse files
app.py
CHANGED
|
@@ -64,9 +64,9 @@ with demo:
|
|
| 64 |
# Update the URL below to switch from Sandbox to real data collection
|
| 65 |
def _submit(state, dummy):
|
| 66 |
query = parse_qs(dummy[1:])
|
| 67 |
-
assert "
|
| 68 |
-
state["assignmentId"] = query["
|
| 69 |
-
url = "https://workersandbox.mturk.com/mturk/
|
| 70 |
return requests.post(url, data=state)
|
| 71 |
|
| 72 |
# Button event handlers
|
|
|
|
| 64 |
# Update the URL below to switch from Sandbox to real data collection
|
| 65 |
def _submit(state, dummy):
|
| 66 |
query = parse_qs(dummy[1:])
|
| 67 |
+
assert "assignment_id" in query, "No assignment ID provided, unable to submit"
|
| 68 |
+
state["assignmentId"] = query["assignment_id"]
|
| 69 |
+
url = "https://workersandbox.mturk.com/mturk/externalSubmit"
|
| 70 |
return requests.post(url, data=state)
|
| 71 |
|
| 72 |
# Button event handlers
|