jeffcrouse / mturk Goto Github PK
View Code? Open in Web Editor NEWMechanical Turk APi for Node
Mechanical Turk APi for Node
you are using very old versions of the dependencies
From Master when trying to HIT.get
/Applications/MAMP/htdocs/turkmonkey/node_modules/mturk/model/hit.js:42 this.requesterAnnotation = JSON.parse(this.requesterAnnotation); ^ SyntaxError: Unexpected token B at Object.parse (native) at HIT.populateFromResponse (/Applications/MAMP/htdocs/turkmonkey/node_modules/mturk/model/hit.js:42:39) at /Applications/MAMP/htdocs/turkmonkey/node_modules/mturk/model/hit.js:249:13 at /Applications/MAMP/htdocs/turkmonkey/node_modules/mturk/lib/request.js:115:9 at Request.<anonymous> (/Applications/MAMP/htdocs/turkmonkey/node_modules/mturk/lib/xml-native.js:73:7) at Request.EventEmitter.emit (events.js:95:17) at IncomingMessage.<anonymous> (/Applications/MAMP/htdocs/turkmonkey/node_modules/mturk/node_modules/request/main.js:517:14) at IncomingMessage.EventEmitter.emit (events.js:117:20) at _stream_readable.js:920:16 at process._tickCallback (node.js:415:13)
From Dev branch when trying to just run it
/Applications/MAMP/htdocs/turkmonkey/node_modules/mturk/index.js:8 if( Npm ) { ^ ReferenceError: Npm is not defined at Object.<anonymous> (/Applications/MAMP/htdocs/turkmonkey/node_modules/mturk/index.js:8:5)
Getting the following error when attempting to make a request to the Mechanical Turk API:
TypeError: Cannot call method 'text' of undefined
at Request._callback (/opt/app/node_modules/mturk/index.js:1057:49)
at Request.self.callback (/opt/app/node_modules/mturk/node_modules/request/request.js:123:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request.<anonymous> (/opt/app/node_modules/mturk/node_modules/request/request.js:893:14)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/opt/app/node_modules/mturk/node_modules/request/request.js:844:12)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:919:16
at /opt/app/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:177:31
at process._tickCallback (node.js:419:13)
Seems to be erroring on โvar errMsg = doc.get("//Error/Message").text();
โ Could be that the error message coming back from Amazon is improperly formatted or blank? Perhaps there should be a way to check for this? Not sure. Help me out.
I'm working hard on the develop branch of this repo, trying to be a good TDD/BDD developer, but I am new to the TDD/BDD and I am stuck.
I am using mocha/chai, and everything is fine for operations like GetAccountBalance, RegisterHITType, CreateHIT, GetHIT, SearchHITs, etc. ie: operations that don't have anything to do with worker-submitted assignments
But I can't figure out how to write good tests for operations like ApproveAssignment that will play nicely with a continuous integration tool like travis-ci. Originally I thought that there could be 2 different sets of tests: one that creates/searches/browses HITs and another that deals with approving and rejecting assignments, but this couldn't be automated.
It seems like a major purpose of the tests it to make sure that the code interacts successfully with the actual mturk API, so using fake input would not be productive.
Any ideas?
I am trying to enable the notifications of an hitType with no luck. I am missing something?
HITType.create( ..., function ( err, hitType ) {
var hitTypeId = hitType.id;
// Notification data
var url = 'http/localhost/listen';
var transport = 'REST';
var events = [ ... ];
var notification = Notification.build( url, transport, events );
hitType.setNotification( notification, true, function ( err ) {
this app breaks with express 4
Given the lack of any activity over the past year on this project, I just wanted to check if @jefftimesten had perhaps stopped using mturk and is now doing something else.
@srubin, @marclar, @GeoffreyPlitt, @shawnburke, @dogichow, and @neyric all have open pull requests on this project.
Would any of you guys perhaps be interested in making a new fork that integrates all of these? It could be merged into this project at some point, or it could just be maintained by someone else.
I also noticed that @chbrown has done some extensive revising of this library to take out the notification receptor and ORM stuff. Would be curious if he'd pitch in his rationale behind that.
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.