We typically are NOT getting enough donations to pay the monthly server bill. We need your help! Click the thermometer to learn more.
Note: clicking on the above banners and making ANY purchase returns a commission to Turker Nation.
If you can't see the ad, please click on Shop on Amazon instead. | Want to advertise here? PM Spamgirl to learn more!




Results 1 to 8 of 8

Thread: Need to reverse rejections? Here is an easy tool to do it:

  1. #1

    Need to reverse rejections? Here is an easy tool to do it:

    If you use the Requester UI:

    Read mTurk's official blog for instructions: http://mechanicalturk.typepad.com/bl...interface.html

    If you use the backend API:

    Spamgirl asked me to post about this new-ish API call, so here goes.

    Once upon a time, if you wanted to reverse a previously-rejected assignment, you had to write to Amazon with all the details and hope they would follow through.

    But no more! Now you can execute the reversal yourself and get immediate confirmation.

    If you already use the API, simply refer to the ApproveRejectedAssignment call (http://bit.ly/IxtlGZ). If you do not use the API, here is a semi-manual but simple way for you to use the functionality:

    MTurk Rejection Reverser

    Fill in three form fields, hit "unReject!" and you'll see a confirmation or an error message from Amazon.

    N.B.: There's a security issue here in that you don't want me to know your credentials. This tool does not store anything, and it uses POST and HTTPS to keep the access keys hidden, but just to be clear you either have to trust me on that or use the API directly. If Spamgirl wants to host the tool I'm happy to give her my code.

    Here is a screen shot showing a rejected assignment that I just approved (big surprise, I make mistakes). The red text is the confirmation from Amazon.



    Finally, you can grab the code here:

    http://www.techlist.com/mturk/unReject.txt

    Enjoy!
    techlist
    Last edited by techlist; 04-27-2012 at 08:04 PM. Reason: adding link to code

  2. #2
    Community Manager spamgirl's Avatar
    Join Date
    Aug 2011
    Gender
    Female
    Location
    Canada
    Posts
    12,278
    Thanks
    2,532
    Thanked 6,634 Times in 2,152 Posts

    FWIW, this tool was used tonight and it worked perfectly. You can use it on techlist's server or just put it on your own server.
    It's all good.

  3. #3
    .

    Updated the tool to accept multiple AssignmentIds at once, delimited by comma, linebreak or whatever.

    Amazon only takes the requests one at a time, so be patient if dropping in a large list to process.

    Also added semi-friendly error/confirmation messages rather than the XML dump from Amazon
    Last edited by techlist; 04-28-2012 at 04:51 AM.

  4. #4
    Hi,

    I'd like to reverse a rejection, but I can't access www.techlist.com (Chrome keeps telling me that the DNS lookup failed). Does anybody know of an alternate link/another way to do this?

    Thanks!
    Miriam

  5. #5
    Community Manager spamgirl's Avatar
    Join Date
    Aug 2011
    Gender
    Female
    Location
    Canada
    Posts
    12,278
    Thanks
    2,532
    Thanked 6,634 Times in 2,152 Posts

    I can't access techlist anymore either :/ There is no other way unless you know how to use the backend API.
    It's all good.

  6. #6
    Okay, thanks! Meantime, I've sent an email to MTurk customer support.

  7. #7
    Community Manager spamgirl's Avatar
    Join Date
    Aug 2011
    Gender
    Female
    Location
    Canada
    Posts
    12,278
    Thanks
    2,532
    Thanked 6,634 Times in 2,152 Posts

    It's working now! Also, if you'd like the backend scripting to do it on your own, you can find it here:

    http://turkrequesters.blogspot.ca/20...nments-on.html

    But in case that ever goes down, here is a copy:

    Second unrejection method: Harder, but possibly more rewarding
    The second way to unreject is to install the API yourself (here I'll demonstrate with the Perl API) and call the ApproveRejectedAssignment operation.

    Here's an example Perl script you can use to achieve this (you'll need the Net::Amazon::MechanicalTurk CPAN module, install it with cpan -f -i Net::Amazon::MechanicalTurk. The -f "force" flag is not optional, it really is that shoddily written.)

    #!/usr/bin/perl
    #Thanks to Tani Hosokawa for the script!
    use Net::Amazon::MechanicalTurk;
    use Getopt::Long;
    use strict;
    my $sandbox = 0;
    my %turk_options;
    my $assignmentId;
    GetOptions("assignmentId:s" => \$assignmentId, "sandbox" => \$sandbox);
    if (not $sandbox) {
    $turk_options{serviceUrl} = 'https://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester';
    }
    my $mturk = Net::Amazon::MechanicalTurk->new(
    %turk_options
    );
    my $result = $mturk->ApproveRejectedAssignment(
    Operation => "ApproveRejectedAssignment",
    AssignmentId => $assignmentId,
    );
    Then, you'll want to get a text file together with the ID's of the assignments you want to unreject, which should look something like this:

    A2xxxxxxxxxx
    A2xxxxxxxxxx
    A2xxxxxxxxxx
    A2xxxxxxxxxx
    A2xxxxxxxxxx
    A2xxxxxxxxxx
    You can either modify the above Perl script or just use a simple Bash script to run it through the assignments. In either case, make sure you use dos2unix file.txt beforehand to turn the \r\n characters into just \n characters if you made the file in Windows.

    The final script will look something like (run it with ./unreject.sh filename):

    dos2unix "$@"
    for line in `cat "$@"`
    do
    perl unreject.pl --assignmentID=$line
    echo $line
    If you got this far, you're done.
    It's all good.

  8. #8
    Community Manager spamgirl's Avatar
    Join Date
    Aug 2011
    Gender
    Female
    Location
    Canada
    Posts
    12,278
    Thanks
    2,532
    Thanked 6,634 Times in 2,152 Posts

    It's all good.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •