Is there an update or something I am missing about whoops yall?

71 views
Skip to first unread message

John Mark Johnson

unread,
Jul 6, 2021, 10:01:34 PM7/6/21
to PsiTurk
I finally got my other experiment up and running. However, now I am trying to compensate some participants from a few errors that occurred during my first live attempts.

I have everything set up with whoops yall. Everything is configured with heroku. the app seems to be working fine. I go to the dashboard and add a worker id (e.g. my worker id for testing purposes: A2XKUSIPUCMIUL) to compensate and I am given the secret code. However, when I create a hit in sandbox and got plug in the secret code I am given this error:

Error: This code is not correct. Please try again. If you continue to have difficulty please contact the requester.
021-07-06 20:49:56,309 Exception on /whoopsyall_dashboard [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 3490, in one
    ret = self.one_or_none()
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 3467, in one_or_none
    raise orm_exc.MultipleResultsFound(
sqlalchemy.orm.exc.MultipleResultsFound: Multiple rows were found for one_or_none()

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.9/site-packages/psiturk/user_utils.py", line 74, in decorated
    return func(*args, **kwargs)
  File "/Users/JMJ/whoops_yall/custom.py", line 80, in dashboard
    user = Participant.query.filter(Participant.workerid == lw.amt_worker_id).one()
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 3492, in one
    util.raise_(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
sqlalchemy.orm.exc.MultipleResultsFound: Multiple rows were found for one()
2021-07-06 20:50:04,727 Exception on /whoopsyall_dashboard [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 3490, in one
    ret = self.one_or_none()
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 3467, in one_or_none
    raise orm_exc.MultipleResultsFound(
sqlalchemy.orm.exc.MultipleResultsFound: Multiple rows were found for one_or_none()

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.9/site-packages/psiturk/user_utils.py", line 74, in decorated
    return func(*args, **kwargs)
  File "/Users/JMJ/whoops_yall/custom.py", line 80, in dashboard
    user = Participant.query.filter(Participant.workerid == lw.amt_worker_id).one()
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 3492, in one
    util.raise_(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
sqlalchemy.orm.exc.MultipleResultsFound: Multiple rows were found for one()
2021-07-06 20:50:11,733 Exception on /whoopsyall_dashboard [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 3490, in one
    ret = self.one_or_none()
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 3467, in one_or_none
    raise orm_exc.MultipleResultsFound(
sqlalchemy.orm.exc.MultipleResultsFound: Multiple rows were found for one_or_none()

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.9/site-packages/psiturk/user_utils.py", line 74, in decorated
    return func(*args, **kwargs)
  File "/Users/JMJ/whoops_yall/custom.py", line 80, in dashboard
    user = Participant.query.filter(Participant.workerid == lw.amt_worker_id).one()
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 3492, in one
    util.raise_(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
sqlalchemy.orm.exc.MultipleResultsFound: Multiple rows were found for one()
2021-07-06 20:50:16,395 Exception on /whoopsyall_dashboard [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 3490, in one
    ret = self.one_or_none()
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 3467, in one_or_none
    raise orm_exc.MultipleResultsFound(
sqlalchemy.orm.exc.MultipleResultsFound: Multiple rows were found for one_or_none()

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.9/site-packages/psiturk/user_utils.py", line 74, in decorated
    return func(*args, **kwargs)
  File "/Users/JMJ/whoops_yall/custom.py", line 80, in dashboard
    user = Participant.query.filter(Participant.workerid == lw.amt_worker_id).one()
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 3492, in one
    util.raise_(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
sqlalchemy.orm.exc.MultipleResultsFound: Multiple rows were found for one()

I am not given any errors in the heroku logs. I am given the following errors in the server log but I am not quite sure what it means and can't find any examples that are helpful:


Dave Eargle

unread,
Jul 7, 2021, 11:20:33 AM7/7/21
to John Mark Johnson, PsiTurk
The following line in your log leads me to guess that your workerid is present in the participant table more than once -- perhaps from debugging and sandbox runs or something like that -- and the code can't handle that. For your tests, you can delete all records with your workerid from the participants table and try again.

File "/Users/JMJ/whoops_yall/custom.py", line 80, in dashboard
    user = Participant.query.filter(Participant.workerid == lw.amt_worker_id).one()
--
You received this message because you are subscribed to the Google Groups "PsiTurk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psiturk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psiturk/dd9d9178-02ef-443a-95e6-3820a5051c2bn%40googlegroups.com.

Dave Eargle

unread,
Jul 7, 2021, 11:21:02 AM7/7/21
to PsiTurk
The following line in your log leads me to guess that your workerid is present in the participant table more than once -- perhaps from debugging and sandbox runs or something like that -- and the code can't handle that. For your tests, you can delete all records with your workerid from the participants table and try again.
> File "/Users/JMJ/whoops_yall/custom.py", line 80, in dashboard
    user = Participant.query.filter(Participant.workerid == lw.amt_worker_id).one()
On Tue, Jul 6, 2021, 8:01 PM John Mark Johnson <johnso...@gmail.com> wrote:

John Mark Johnson

unread,
Jul 7, 2021, 2:37:10 PM7/7/21
to Dave Eargle, PsiTurk
I tried that and although I don't have any current errors it still isn't working.

I tried inspecting for errors on the webpage as I tried to submit the completion code, it showed this:

screenshot 6.png
I guess the database and app aren't talking correctly but I am not getting any errors. Is there any screen or better test I could show for advice on what to do?

Should I use postgre if using heroku in this instance? or is it better to keep sqlite? I know what the psiturk documentation says but I wasn't sure for whoops_yall. In any case, I have tried both and get stuck at the above picture.

I understand now about looking at the errors but unfortunately I'm not getting any errors now..



John Mark Johnson

unread,
Jul 8, 2021, 1:22:40 PM7/8/21
to Dave Eargle, PsiTurk
I found an earlier post where you had suggested people having trouble running ‘heroku run psiturk config print’. 

I ran this on my whoops_yall app (the experiment not working) and my thesis_exp (the one working). 

Curiously, my aws credentials are blank in the whoops yall config printout. Now this is curious because they are not blank in my working experiment. Moreover, I had already set the the aws credentials on the heroku environment vars. 

How do I get the aws credentials not to show up as blank when I run:
Heroku run psiturk config print’ on the whoops yall experiment. We don’t enter the credentials on the config.txt file so I’m not sure how to go about this when my aws credentials are already set in the heroku env vars? 

John Mark Johnson

unread,
Jul 9, 2021, 1:11:06 PM7/9/21
to PsiTurk
I reset and restarted everything. I still get the error that the codes are incorrect. Here is the only error I get from the server.log:

[2021-07-09 11:44:24 -0500] [26100] [ERROR] Socket error processing request.

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base_async.py", line 65, in handle
    util.reraise(*sys.exc_info())
  File "/usr/local/lib/python3.9/site-packages/gunicorn/util.py", line 625, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base_async.py", line 55, in handle
    self.handle_request(listener_name, req, client, addr)
  File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/ggevent.py", line 143, in handle_request
    super().handle_request(listener_name, req, sock, addr)
  File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base_async.py", line 128, in handle_request
    util.reraise(*sys.exc_info())
  File "/usr/local/lib/python3.9/site-packages/gunicorn/util.py", line 625, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base_async.py", line 111, in handle_request
    resp.write_file(respiter)
  File "/usr/local/lib/python3.9/site-packages/gunicorn/http/wsgi.py", line 396, in write_file
    if not self.sendfile(respiter):
  File "/usr/local/lib/python3.9/site-packages/gunicorn/http/wsgi.py", line 386, in sendfile
    sent += os.sendfile(sockno, fileno, offset + sent, count)
  File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/ggevent.py", line 36, in _gevent_sendfile
    return _os_sendfile(fdout, fdin, offset, nbytes)
OSError: [Errno 57] Socket is not connected

the hits are posting to mturk correctly, I am getting complete codes from the dashboard. Everything seems to work except when I submit the code. I don't know where to begin solving this connection error as I cannot find any information on it online. Is this a problem with my computer? Is this a problem with the software? Is this a problem with heroku?

Dave Eargle

unread,
Jul 16, 2021, 6:05:32 PM7/16/21
to John Mark Johnson, PsiTurk
idk, but I just went through a live (sandbox) test start to finish, and it worked for me, so it's not a psiturk codebase problem.

> Is this a problem with my computer? Is this a problem with the software? Is this a problem with heroku?

Are you trying to host this from your computer? That stacktrace looks like you're checking a local server.log, which doesn't make sense if you're running a whoopsyall app on heroku.

This level of help is consulting-service troubleshooting level. I'm considering doing like what https://scienceinhydroponics.com/services does and offering one-on-one help, for the kinds of I'm-dying questions that have come up over the last few months. Doctoral advisers pushing grad students to collect data online are asking their students to add a lot of new skills to their toolbelts. There should be some money available somewhere to help the students get through it. 

John Mark Johnson

unread,
Jul 16, 2021, 6:26:03 PM7/16/21
to Dave Eargle, PsiTurk
I would have paid you a $100 a question last week when I was experiencing this issue and that is not an exaggeration. 

I never got it resolved and ended up paying people on PayPal. I loaded the experiment on a different Mac and uploaded it to a new heroku account- still no dice. I would like to know just for my own curiosity what it could have been because- as I mentioned- I wasn’t getting any errors. I did get all of my data for my study so I’m in no way complaining. Just genuinely curious 

John Mark Johnson

unread,
Jul 16, 2021, 6:32:42 PM7/16/21
to Dave Eargle, PsiTurk
And I agree it is a different level of help.. the problem was I wasn’t even sure who I could call or ask for advice because there was not any information to share about the circumstance beyond “html doc says the code is bad”
Reply all
Reply to author
Forward
0 new messages