NYUCCL / psiTurk

An open platform for science on Amazon Mechanical Turk.
https://psiturk.org
MIT License
277 stars 140 forks source link

`worker approve` not approving but also not displaying errors #362

Closed tyler-tomita closed 5 years ago

tyler-tomita commented 5 years ago

I'm not sure if I should've opened a new issue. I'm facing a different but related problem to issue #360 that I raised.

I created a live hit using psiTurk installed from master (~4 days ago) on Heroku and python 3.7.3.

The assignments appear to be successfully completed, as I get status codes 4.

When I try to approve using the --hit flag, I get this:

[psiTurk server:off mode:live #HITs:0]$ worker approve --hit MYHITID
Approving submissions for HITs MYHITID for the current study

Normally a message is displayed for each assignment that is successfully approved, but that isn't happening. Furthermore, when I run hit list, it shows Status: reviewable and completed:0, suggesting that the assignments aren't actually being approved. This is further confirmed by the fact that it won't let me delete the hit.

The same thing happens when I try the --all flag. Furthermore, trying to approve individual assignments raises this error:

[psiTurk server:off mode:live #HITs:0]$ worker approve MYASSIGNMENTID
Approving specified submissions for the current study...
Response(Operation: approve_assignment_by_assignment_id | Status: error | Exception: AssignmentIdNotFoundInLocalDBError: )

I checked the database entry and the assignment id is definitely correct.

One very strange thing is that the datastring column is in utf-8 hex code, instead of normal characters. Could this be affecting things? When I submitted the HIT myself in Sandbox mode, the datastring looked normal and I was able to approve my assignment.

I'm a bit concerned now because I have two workers who are waiting for their assignments to be approved.

jacob-lee commented 5 years ago

It could be the utf-8 hex.

You may just approve the workers inside mturk's gui, or write a custom boto3 python script to do it (won't change the status inside the psiturk database tho).

On Thu, Jul 25, 2019 at 1:57 PM Tyler Tomita notifications@github.com wrote:

I'm not sure if I should've opened a new issue. I'm facing a different but related problem to issue #40 https://github.com/NYUCCL/psiTurk/issues/40 that I raised.

I created a live hit using psiTurk installed from master (~4 days ago) on Heroku and python 3.7.3.

The assignments appear to be successfully completed, as I get status codes 4.

When I try to approve either --hit, I get this:

[psiTurk server:off mode:live #HITs:0]$ worker approve --hit MYHITID Approving submissions for HITs MYHITID for the current study

Normally a message is displayed for each assignment that is successfully approved, but that isn't happening. Furthermore, when I run hit list, it shows Status: reviewable and completed:0, suggesting that the assignments aren't actually being approved. This is further confirmed by the fact that it won't let me delete the hit.

The same thing happens when I try the --all flag. Furthermore, trying to approve individual assignments raises this error:

[psiTurk server:off mode:live #HITs:0]$ worker approve MYASSIGNMENTID Approving specified submissions for the current study... Response(Operation: approve_assignment_by_assignment_id | Status: error | Exception: AssignmentIdNotFoundInLocalDBError: )

I checked the database entry and the assignment id is definitely correct.

One very strange thing is that the datastring column is in utf-8 hex code, instead of normal characters. Could this be affecting things? When I submitted the HIT myself in Sandbox mode, the datastring looked normal and I was able to approve my assignment.

I'm a bit concerned now because I have two workers who are waiting for their assignments to be approved.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NYUCCL/psiTurk/issues/362?email_source=notifications&email_token=AAM5SQOQVOES5BXNFMGD6GTQBHSQLA5CNFSM4IG5B3YKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBRLBTQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAM5SQMJHPDLVXUKHQ7UXLLQBHSQLANCNFSM4IG5B3YA .

deargle commented 5 years ago

You had a strage problem the other day, too. Can you talk more about your setup? E.g., running on heroku with a postgres db addon and with the heroku db url in your local config.txt so that when you run these psiturk commands, it is checking against the same database as the one your turkers are hitting?

You can pass the --all-studies flag in addition in order to try approving even if they're not found in your local db. But that will leave your psiturk db out of state. Or use the mturk gui.

You had an odd shell error the other day too when you tried python 3 -- how did you resolve that?

On Thu, Jul 25, 2019, 12:45 PM jacob-lee notifications@github.com wrote:

It could be the utf-8 hex.

You may just approve the workers inside mturk's gui, or write a custom boto3 python script to do it (won't change the status inside the psiturk database tho).

On Thu, Jul 25, 2019 at 1:57 PM Tyler Tomita notifications@github.com wrote:

I'm not sure if I should've opened a new issue. I'm facing a different but related problem to issue #40 < https://github.com/NYUCCL/psiTurk/issues/40> that I raised.

I created a live hit using psiTurk installed from master (~4 days ago) on Heroku and python 3.7.3.

The assignments appear to be successfully completed, as I get status codes 4.

When I try to approve either --hit, I get this:

[psiTurk server:off mode:live #HITs:0]$ worker approve --hit MYHITID Approving submissions for HITs MYHITID for the current study

Normally a message is displayed for each assignment that is successfully approved, but that isn't happening. Furthermore, when I run hit list, it shows Status: reviewable and completed:0, suggesting that the assignments aren't actually being approved. This is further confirmed by the fact that it won't let me delete the hit.

The same thing happens when I try the --all flag. Furthermore, trying to approve individual assignments raises this error:

[psiTurk server:off mode:live #HITs:0]$ worker approve MYASSIGNMENTID Approving specified submissions for the current study... Response(Operation: approve_assignment_by_assignment_id | Status: error | Exception: AssignmentIdNotFoundInLocalDBError: )

I checked the database entry and the assignment id is definitely correct.

One very strange thing is that the datastring column is in utf-8 hex code, instead of normal characters. Could this be affecting things? When I submitted the HIT myself in Sandbox mode, the datastring looked normal and I was able to approve my assignment.

I'm a bit concerned now because I have two workers who are waiting for their assignments to be approved.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/NYUCCL/psiTurk/issues/362?email_source=notifications&email_token=AAM5SQOQVOES5BXNFMGD6GTQBHSQLA5CNFSM4IG5B3YKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBRLBTQ , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAM5SQMJHPDLVXUKHQ7UXLLQBHSQLANCNFSM4IG5B3YA

.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NYUCCL/psiTurk/issues/362?email_source=notifications&email_token=AAI6Y7LU5NE4SZYWHWINKD3QBHYEZA5CNFSM4IG5B3YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD22NJTQ#issuecomment-515167438, or mute the thread https://github.com/notifications/unsubscribe-auth/AAI6Y7JTELKPOUJIICRBOPLQBHYEZANCNFSM4IG5B3YA .

deargle commented 5 years ago

Sorry, i guess I skimmed over a large chunk of the first part of your post. It may be helpful if we could synchronously debug this. Also, a dump of your db would be helpful, if we can find a way of sharing that you are comfortable with. I'm thrown because unit tests are passing with 3.7.3.

Also reminds me of jacob's weird ampersand url thing on the google group.

On Thu, Jul 25, 2019, 2:17 PM Dave Eargle dave.eargle@gmail.com wrote:

You had a strage problem the other day, too. Can you talk more about your setup? E.g., running on heroku with a postgres db addon and with the heroku db url in your local config.txt so that when you run these psiturk commands, it is checking against the same database as the one your turkers are hitting?

You can pass the --all-studies flag in addition in order to try approving even if they're not found in your local db. But that will leave your psiturk db out of state. Or use the mturk gui.

You had an odd shell error the other day too when you tried python 3 -- how did you resolve that?

On Thu, Jul 25, 2019, 12:45 PM jacob-lee notifications@github.com wrote:

It could be the utf-8 hex.

You may just approve the workers inside mturk's gui, or write a custom boto3 python script to do it (won't change the status inside the psiturk database tho).

On Thu, Jul 25, 2019 at 1:57 PM Tyler Tomita notifications@github.com wrote:

I'm not sure if I should've opened a new issue. I'm facing a different but related problem to issue #40 < https://github.com/NYUCCL/psiTurk/issues/40> that I raised.

I created a live hit using psiTurk installed from master (~4 days ago) on Heroku and python 3.7.3.

The assignments appear to be successfully completed, as I get status codes 4.

When I try to approve either --hit, I get this:

[psiTurk server:off mode:live #HITs:0]$ worker approve --hit MYHITID Approving submissions for HITs MYHITID for the current study

Normally a message is displayed for each assignment that is successfully approved, but that isn't happening. Furthermore, when I run hit list, it shows Status: reviewable and completed:0, suggesting that the assignments aren't actually being approved. This is further confirmed by the fact that it won't let me delete the hit.

The same thing happens when I try the --all flag. Furthermore, trying to approve individual assignments raises this error:

[psiTurk server:off mode:live #HITs:0]$ worker approve MYASSIGNMENTID Approving specified submissions for the current study... Response(Operation: approve_assignment_by_assignment_id | Status: error | Exception: AssignmentIdNotFoundInLocalDBError: )

I checked the database entry and the assignment id is definitely correct.

One very strange thing is that the datastring column is in utf-8 hex code, instead of normal characters. Could this be affecting things? When I submitted the HIT myself in Sandbox mode, the datastring looked normal and I was able to approve my assignment.

I'm a bit concerned now because I have two workers who are waiting for their assignments to be approved.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/NYUCCL/psiTurk/issues/362?email_source=notifications&email_token=AAM5SQOQVOES5BXNFMGD6GTQBHSQLA5CNFSM4IG5B3YKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBRLBTQ , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAM5SQMJHPDLVXUKHQ7UXLLQBHSQLANCNFSM4IG5B3YA

.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NYUCCL/psiTurk/issues/362?email_source=notifications&email_token=AAI6Y7LU5NE4SZYWHWINKD3QBHYEZA5CNFSM4IG5B3YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD22NJTQ#issuecomment-515167438, or mute the thread https://github.com/notifications/unsubscribe-auth/AAI6Y7JTELKPOUJIICRBOPLQBHYEZANCNFSM4IG5B3YA .

jacob-lee commented 5 years ago

I should update and specify that I was running on python 2.7, and, for most participants the amp didn't occur. still haven't identified the issue however

On Thu, Jul 25, 2019, 4:25 PM Dave Eargle notifications@github.com wrote:

Sorry, i guess I skimmed over a large chunk of the first part of your post. It may be helpful if we could synchronously debug this. Also, a dump of your db would be helpful, if we can find a way of sharing that you are comfortable with. I'm thrown because unit tests are passing with 3.7.3.

Also reminds me of jacob's weird ampersand url thing on the google group.

On Thu, Jul 25, 2019, 2:17 PM Dave Eargle dave.eargle@gmail.com wrote:

You had a strage problem the other day, too. Can you talk more about your setup? E.g., running on heroku with a postgres db addon and with the heroku db url in your local config.txt so that when you run these psiturk commands, it is checking against the same database as the one your turkers are hitting?

You can pass the --all-studies flag in addition in order to try approving even if they're not found in your local db. But that will leave your psiturk db out of state. Or use the mturk gui.

You had an odd shell error the other day too when you tried python 3 -- how did you resolve that?

On Thu, Jul 25, 2019, 12:45 PM jacob-lee notifications@github.com wrote:

It could be the utf-8 hex.

You may just approve the workers inside mturk's gui, or write a custom boto3 python script to do it (won't change the status inside the psiturk database tho).

On Thu, Jul 25, 2019 at 1:57 PM Tyler Tomita notifications@github.com wrote:

I'm not sure if I should've opened a new issue. I'm facing a different but related problem to issue #40 < https://github.com/NYUCCL/psiTurk/issues/40> that I raised.

I created a live hit using psiTurk installed from master (~4 days ago) on Heroku and python 3.7.3.

The assignments appear to be successfully completed, as I get status codes 4.

When I try to approve either --hit, I get this:

[psiTurk server:off mode:live #HITs:0]$ worker approve --hit MYHITID Approving submissions for HITs MYHITID for the current study

Normally a message is displayed for each assignment that is successfully approved, but that isn't happening. Furthermore, when I run hit list, it shows Status: reviewable and completed:0, suggesting that the assignments aren't actually being approved. This is further confirmed by the fact that it won't let me delete the hit.

The same thing happens when I try the --all flag. Furthermore, trying to approve individual assignments raises this error:

[psiTurk server:off mode:live #HITs:0]$ worker approve MYASSIGNMENTID Approving specified submissions for the current study... Response(Operation: approve_assignment_by_assignment_id | Status: error | Exception: AssignmentIdNotFoundInLocalDBError: )

I checked the database entry and the assignment id is definitely correct.

One very strange thing is that the datastring column is in utf-8 hex code, instead of normal characters. Could this be affecting things? When I submitted the HIT myself in Sandbox mode, the datastring looked normal and I was able to approve my assignment.

I'm a bit concerned now because I have two workers who are waiting for their assignments to be approved.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <

https://github.com/NYUCCL/psiTurk/issues/362?email_source=notifications&email_token=AAM5SQOQVOES5BXNFMGD6GTQBHSQLA5CNFSM4IG5B3YKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBRLBTQ

, or mute the thread <

https://github.com/notifications/unsubscribe-auth/AAM5SQMJHPDLVXUKHQ7UXLLQBHSQLANCNFSM4IG5B3YA

.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/NYUCCL/psiTurk/issues/362?email_source=notifications&email_token=AAI6Y7LU5NE4SZYWHWINKD3QBHYEZA5CNFSM4IG5B3YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD22NJTQ#issuecomment-515167438 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAI6Y7JTELKPOUJIICRBOPLQBHYEZANCNFSM4IG5B3YA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NYUCCL/psiTurk/issues/362?email_source=notifications&email_token=AAM5SQOIM6ZNIXM7MALWE6DQBID3PA5CNFSM4IG5B3YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD22VONQ#issuecomment-515200822, or mute the thread https://github.com/notifications/unsubscribe-auth/AAM5SQPL3VYYAYFUT3AXMDTQBID3PANCNFSM4IG5B3YA .

tyler-tomita commented 5 years ago

I resolved the error I was having with the psiturk shell when running Python 3 by using a virtualenv install of python 3 instead of anaconda.

I can share my config.txt and dump of the database but I would want to censor information such as worker id since I'm unsure whether it violates my IRB protocol.

I have been adding dummy rows to my database before running experiments in order to balance the conditions in a certain way. Basically I take an existing row of a table and copy it a bunch of times, but change the condition along with giving dummy worker id, assignment id, and unique id so that I don't have repeats of these three fields. Could this cause problems?

I had been doing this all the time prior to upgrading to psiturk > v2.2.3 and using heroku instead of my own EC2 instance, and it worked fine.

deargle commented 5 years ago

That row duplication thing might cause errors. But i have been mulling this over and my hunch is that you have two different databases in use. The code is such that if you are running on heroku, the config.txt database url is overridden with the heroku environment specified database url. Can you check for that? If you run heroku psql from your project dir, it should auto drop you into a psql shell connected to the heroku db, where you can poke around. Also there's some command like heroku config get which will list all of your env vars, where you would be able to see if there is a database one set. If so, then that is where your participants' data will be stored, but when you run psiturk shell commands from your project dir, it will look in whatever database is specified in your config.txt. can you check?

On Thu, Jul 25, 2019, 3:55 PM Tyler Tomita notifications@github.com wrote:

I resolved the error I was having with the psiturk shell when running Python 3 by using a virtualenv install of python 3 instead of anaconda.

I can share my config.txt and dump of the database but I would want to censor information such as worker id since I'm unsure whether it violates my IRB protocol.

I have been adding dummy rows to my database before running experiments in order to balance the conditions in a certain way. Basically I take an existing row of a table and copy it a bunch of times, but change the condition along with giving dummy worker id, assignment id, and unique id so that I don't have repeats of these three fields. Could this cause problems?

I had been doing this all the time prior to upgrading to psiturk > v2.2.3 and using heroku instead of my own EC2 instance, and it worked fine.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NYUCCL/psiTurk/issues/362?email_source=notifications&email_token=AAI6Y7OEST7IX64RTT4IHTLQBIOLXA5CNFSM4IG5B3YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD224OPI#issuecomment-515229501, or mute the thread https://github.com/notifications/unsubscribe-auth/AAI6Y7JWOPGNJHU6MGN534TQBIOLXANCNFSM4IG5B3YA .

tyler-tomita commented 5 years ago

In the mean time, I tried Jacob's suggestion to approve the workers inside mturk's gui, but it doesn't work for me - I can't see HITs I create via psiTurk in the "manage" section of mTurks requester interface. Should I be able to?

It could be the utf-8 hex. You may just approve the workers inside mturk's gui, or write a custom boto3 python script to do it (won't change the status inside the psiturk database tho). On Thu, Jul 25, 2019 at 1:57 PM Tyler Tomita @.***> wrote: I'm not sure if I should've opened a new issue. I'm facing a different but related problem to issue #40 <#40> that I raised. I created a live hit using psiTurk installed from master (~4 days ago) on Heroku and python 3.7.3. The assignments appear to be successfully completed, as I get status codes 4. When I try to approve either --hit, I get this: [psiTurk server:off mode:live #HITs:0]$ worker approve --hit MYHITID Approving submissions for HITs MYHITID for the current study Normally a message is displayed for each assignment that is successfully approved, but that isn't happening. Furthermore, when I run hit list, it shows Status: reviewable and completed:0, suggesting that the assignments aren't actually being approved. This is further confirmed by the fact that it won't let me delete the hit. The same thing happens when I try the --all flag. Furthermore, trying to approve individual assignments raises this error: [psiTurk server:off mode:live #HITs:0]$ worker approve MYASSIGNMENTID Approving specified submissions for the current study... Response(Operation: approve_assignment_by_assignment_id | Status: error | Exception: AssignmentIdNotFoundInLocalDBError: ) I checked the database entry and the assignment id is definitely correct. One very strange thing is that the datastring column is in utf-8 hex code, instead of normal characters. Could this be affecting things? When I submitted the HIT myself in Sandbox mode, the datastring looked normal and I was able to approve my assignment. I'm a bit concerned now because I have two workers who are waiting for their assignments to be approved. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#362?email_source=notifications&email_token=AAM5SQOQVOES5BXNFMGD6GTQBHSQLA5CNFSM4IG5B3YKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBRLBTQ>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAM5SQMJHPDLVXUKHQ7UXLLQBHSQLANCNFSM4IG5B3YA .

deargle commented 5 years ago

Only if you created them with api keys tied to your gui login. And again, you can use worker approve --all --all-studies to skip the local db check and just approve everything the given api keys can see.

On Thu, Jul 25, 2019, 9:04 PM Tyler Tomita notifications@github.com wrote:

In the mean time, I tried Jacob's suggestion to approve the workers inside mturk's gui, but it doesn't work for me - I can't see HITs I create via psiTurk in the "manage" section of mTurks requester interface. Should I be able to?

It could be the utf-8 hex. You may just approve the workers inside mturk's gui, or write a custom boto3 python script to do it (won't change the status inside the psiturk database tho). … <#m5393840710670329112> On Thu, Jul 25, 2019 at 1:57 PM Tyler Tomita @.***> wrote: I'm not sure if I should've opened a new issue. I'm facing a different but related problem to issue #40 https://github.com/NYUCCL/psiTurk/issues/40 <#40 https://github.com/NYUCCL/psiTurk/issues/40> that I raised. I created a live hit using psiTurk installed from master (~4 days ago) on Heroku and python 3.7.3. The assignments appear to be successfully completed, as I get status codes 4. When I try to approve either --hit, I get this: [psiTurk server:off mode:live #HITs:0]$ worker approve --hit MYHITID Approving submissions for HITs MYHITID for the current study Normally a message is displayed for each assignment that is successfully approved, but that isn't happening. Furthermore, when I run hit list, it shows Status: reviewable and completed:0, suggesting that the assignments aren't actually being approved. This is further confirmed by the fact that it won't let me delete the hit. The same thing happens when I try the --all flag. Furthermore, trying to approve individual assignments raises this error: [psiTurk server:off mode:live #HITs:0]$ worker approve MYASSIGNMENTID Approving specified submissions for the current study... Response(Operation: approve_assignment_by_assignment_id | Status: error | Exception: AssignmentIdNotFoundInLocalDBError: ) I checked the database entry and the assignment id is definitely correct. One very strange thing is that the datastring column is in utf-8 hex code, instead of normal characters. Could this be affecting things? When I submitted the HIT myself in Sandbox mode, the datastring looked normal and I was able to approve my assignment. I'm a bit concerned now because I have two workers who are waiting for their assignments to be approved. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <

362 https://github.com/NYUCCL/psiTurk/issues/362?email_source=notifications&email_token=AAM5SQOQVOES5BXNFMGD6GTQBHSQLA5CNFSM4IG5B3YKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBRLBTQ>,

or mute the thread https://github.com/notifications/unsubscribe-auth/AAM5SQMJHPDLVXUKHQ7UXLLQBHSQLANCNFSM4IG5B3YA .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NYUCCL/psiTurk/issues/362?email_source=notifications&email_token=AAI6Y7N43RESBPYTDQ4NJKDQBJSVDA5CNFSM4IG5B3YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD23LNDY#issuecomment-515290767, or mute the thread https://github.com/notifications/unsubscribe-auth/AAI6Y7JYVKSIOIB4SJ7XHQLQBJSVDANCNFSM4IG5B3YA .

tyler-tomita commented 5 years ago

I just ran this

#!/bin/bash

# gets value of heroku environmental variable DATABASE_URL
VAR1=$(heroku config:get DATABASE_URL)

# gets value of database_url specified in config.txt
VAR2=$(grep -Po "(?<=database_url = ).*" config.txt)

if [ "$VAR1" == "$VAR2" ]; then
    echo "db locations are equal"
else
    echo "db locations are not equal"
fi

which printed db locations are equal

deargle commented 5 years ago

This is really hard to figure out without being able to replicate or get more visibility. Any way you can do your obfuscation thing or whatever and get the error to still happen? For workerid obfuscation, you could salt+hash them.

But to summarize, the thing you are experiencing is that psiturk says that the assignmentid is not found in the local db, but when you log in to the local db, you see it there. This does not happen when you submit the hit yourself, but it does happen when workers take the assignment live.

Curious, when you connect to the db and try to query for the row with the matching assignment_id that is not found when you run worker approve <assignmentid>, how many records are returned?

And, are you using the heroku psql db? Or are you the guy trying to use an older, ec2 db?

deargle commented 5 years ago

Also, if you're running off of master, you should have access to /dashboard route, which has a hits tab, which has a approve all button. Under the hood, that calls the same function which worker approve ___ eventually calls. You could try that, too. You'll want to update again off of master because I recently disallowed the default username-password.

tyler-tomita commented 5 years ago

Okay I've made some progress. I was able to approve the two HITs through the psiTurk shell.

What worked was to remove all rows from the database table except for the ones pertaining to the current HIT I had been trying to approve. After doing so, I was able to approve individual assignments using worker approve <assignment_id>. However, first I tried worker approve --hit <hit_id>, which still wasn't working in the way I mentioned above.

Based on this behavior, there seems to have been some offensive rows in the database for some reason. It could have been from creating dummy rows. The inability to approve all assignments using the --hit must be the result of a different problem, since I still couldn't get that working.

To answer your previous questions, I am using a heroku postgres database that I migrated from an old sqlite db on an EC2 instance. When I query for the individual assignment that is not found, only one query result is returned.

deargle commented 5 years ago

I'm glad you made some progress. I'm going to close this since I cannot replicate it, but if you manage to find a simple procedure that you can share that replicates these issues, I can help pin down what specifically is going on and help to work around it. Likewise for the --hit flag problem -- I'm pretty sure the unit tests are confirming that that's working for the clean db setup procedure that the test use.