cloudyr / pyMTurkR

A Client for the MTurk Requester API
15 stars 8 forks source link

Hit creation fails with qualifications #11

Closed LukasWallrich closed 3 years ago

LukasWallrich commented 4 years ago

Hi Tyler,

I am trying to create HITs or HITTypes with Qualifications, but even when I use the code straight from the documentation, there seems to be a bug (or I am making some silly mistake).

With two qualifications, as in the GenerateQualificationRequirement example, I get the following error (plus an equivalent one for QualificationRequirements2) - not sure if the c() function is meant to introduce the different endings:

Unknown parameter in input: "QualificationRequirements1", must be one of: AutoApprovalDelayInSeconds, AssignmentDurationInSeconds, Reward, Title, Keywords, Description, QualificationRequirements

When I then try to set up a HIT with just one qualification, I get the following error: Invalid type for parameter QualificationRequirements, value: {'QualificationTypeId': '2ARFPLSP75KLA8M8DH1HTEQVJT3SY6', 'Comparator': 'Exists', 'RequiredToPreview': True}, type: <class 'dict'>, valid types: <class 'list'>, <class 'tuple'>

I hope you can help?

All the best,

Lukas

LukasWallrich commented 4 years ago

Just to add: CreateHIT() works fine, but I'd love to be able to use HIT types ...

LukasWallrich commented 4 years ago

I now found a solution by tracing the function - probably the following code in RegisterHITType args <- c(args, QualificationRequirements = qual.req)

should be the same as it is in CreateHIT args <- c(args, list(QualificationRequirements = qual.req)

With that, at least I no longer get an error - hope it works as intended.