josebarrios / api-mturk Goto Github PK
View Code? Open in Web Editor NEWJS implementation of Amazon Mechanical Turk (mturk) API
Home Page: http://josebarrios.github.io/api-mturk/
License: Other
JS implementation of Amazon Mechanical Turk (mturk) API
Home Page: http://josebarrios.github.io/api-mturk/
License: Other
why is this minified before being published? it makes stacktraces unusable
are there any examples of stuff going to createHIT? The reward and question parameters are undocumented
Hi,
I am using api-mturk in the nodegame-mturk module and I have a problem that the vorpal console crashes if there is an error such as:
"ApproveAssignment": RequestError - AWS.MechanicalTurk.InvalidAssignmentState. This operation can be called with a status of: null (1564062665570):
The following happens
ng-amt$ uploadResults /home/stefano/www/nodegame-mturk/node_modules/api-mturk/index.js:132 throw new Error(this.getErrorMessage(response)); ^ Error: RequestError - AWS.MechanicalTurk.InvalidAssignmentState. This operation can be called with a status of: Submitted (1564062609327): at IncomingMessage.res.on (/home/stefano/www/nodegame-mturk/node_modules/api-mturk/index.js:132:21) at IncomingMessage.emit (events.js:203:15) at endReadableNT (_stream_readable.js:1129:12) at process._tickCallback (internal/process/next_tick.js:63:19)
I am not sure why the reject callback is not called, I could fix by changing this line, but I am not sure it is the proper way to go about.
} else {
// throw new Error(this.getErrorMessage(response));
if (reject) reject(this.getErrorMessage(response));
}
ExtendHIT is not supported in the new 2017 API. We must add support for it
Hi,
I used your example code to test the lib but it seems that my HIT is not really created. After I created the HIT, I get a positive feedback and also IDs but the HIT is not visible in my MT interface.
My mistake, your api works
pulling down 200kb every startup is slow and a waste of bandwidth. should either be cached or stored locally.
i saw the commit where you removed it locally and i think thats a really bad idea. if the module mturk-api isn't tied to any specific API version, then lets say one day amazon changes the data it returns and now your code breaks randomly in production because this module is always using the latest version no matter what
Promises from the req
library won't eject if there's a connection outage, which makes handling logic impossible.
Error 'worker needs to have worked for requester' gets passed on as a valid response, when it should be passed as an error
Right now, when a request parameter value is undefined or null, the handler fails silently. Please verify that all parameter submitted are checked for these conditions and throw the user an error/warning.
Its as though a api.req to GetReviewableHITs only returns the first 10 results. Is there a way to a variable amount of results or at least able to paginate through the results?
When the API returns an error, the promise still goes through fine and the end-user is left diving into the object to check for an error
Example response object when an error occurs:
{
"OperationRequest":{
"RequestId":"9b35df27-371b-4e3b-8ef3-3d2de518352e"
},
"HIT":[
{
"Request":{
"IsValid":"False",
"Errors":{
"Error":[
{
"Code":"AWS.InvalidEnumeratedParameter",
"Message":"The value \"Illegal Text data found as child of: Reward\" you specified for enumeration is invalid. (1441703429839 s)",
"Data":[
{
"Key":"Parameter",
"Value":"enumeration"
},
{
"Key":"Value",
"Value":"Illegal Text data found as child of: Reward"
}
]
}
]
}
}
}
]
}
Handle errors better when credentials are invalid (error now only says: [TypeError: Cannot read property 'sigBytes' of undefined])
When creating a HIT using the 2014 API legacy support returns the wrong date parameter (always 1970-01-19T02:22:20.289+00:00). Instead, the 2014 should return the correct CreateTime and Expiration dates (e.g., 2019-07-21T14:22:20.289+00:00)
Current API assume the access id / key setup correctly, when user use an invalid AWS authentication id or key, it throws the error
W20160406-11:11:55.969(-4)? (STDERR) TypeError: Cannot read property '0' of undefined
W20160406-11:11:55.969(-4)? (STDERR) at ... \mturk-api\index.js:75:59
would you consider to fix this? Thank you!
I get this error
Error occurred Error: The value is not valid for the parameter type. Expected values HITTEMPLATE.
when calling
mturkAPI.req('GetHITsForQualificationType',{ QualificationTypeId:options.mturk.HITTypeId }).then(function(results) {
return done(null, results);
}).catch((error)=> {
logger.error("Error occurred %s", error.toString());
});
According to the GetHITsForQualificationType API Docs, parameters should be correct.
Amazon is slowly deprecating SOAP in favor of REST. They've already done away with SOAP completely for EC2. It is critical that we start planning ahead for a potential SOAP deprecation in MTurk.
Currently, MTurk SOAP requests are not fully support other AWS services like IAM. This means that, because we use SOAP, users need to use their root keys in order to make MTurk requests using our API. When we migrate to REST root keys will still work, but they will no longer be the only option.
Please let me know your thoughts, comments or concerns.
It happens when calling the GetHITsForQualificationType
api:
mturkAPI.req('GetHITsForQualificationType',{ QualificationTypeId:HITTypeId }).then(function(results) {
self.logger.debug("loaded HITS %d", results.length);
return done(null, results);
}).catch((error)=> {
self.logger.error("Error occurred %s", error.toString());
});
Thanks for the great module!
I am importing your module in my program using var mturkApi = require('mturk-api') and it all works find on my local machine. When I deploy my app to heroku, npm throws an error 'Error: cannot find module 'mturk-api'
Any idea what is going on here?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.