HIT Table pulled from Python API not matching UI?

0

Hi, I fielded a batch on the UI, and am seeing that 90 people responded. But when I pull the HIT table using the below python code, the number of people that it says completed the HIT are 0? Why would that be?

Screenshot of the .csv pulled from the Python API vs the screenshot from the UI is attached. I'd really appreciate any help!![! Enter image description here

Python code (with sensitive info censored):

################

SETUP

################## get_ipython().system('pip install boto3')

import boto3 as bt import functools as fn import pandas as pd import numpy as np import datetime as dt import xml.etree.ElementTree as ET import math as m import csv import os import time

#Switch to this version when doing the actual fielding mturk = bt.client('mturk', aws_access_key_id = "ZZZZZZZZZZZZz", aws_secret_access_key = "ZZZZZZZZZZZ", region_name='us-east-1', )

#Creates a table of all HITs

PAGE_SIZE = 100 #Must be <= 100

all_hits = mturk.list_hits(MaxResults = PAGE_SIZE)

next_token = all_hits["NextToken"]

hit_table = pd.DataFrame(all_hits['HITs']) while (all_hits['NumResults'] == PAGE_SIZE): print("Using next token: {}".format(next_token)) all_hits = mturk.list_hits( MaxResults=PAGE_SIZE, NextToken=next_token) hit_table = pd.concat([pd.DataFrame(all_hits['HITs']), hit_table], ignore_index=True) next_token = all_hits['NextToken']

hit_table.to_csv('test.csv'))

demandé il y a 2 ans55 vues
Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions