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 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南