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'))

已提问 2 年前55 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则