No matter what I do I keep getting error 1010(repeat participants)

123 views
Skip to first unread message

Kara Schwartz

unread,
May 12, 2021, 6:47:38 PM5/12/21
to PsiTurk
Ever since psiturk updated to version 3 i have been unable to get in in good running condition like it was before. I used to be able to deploy my experiment on psiturk,create a HIT, run myself through the experiment,and then get data from that HIT. 

Once they updated I had to switch to heroku. I did that , I can now run my experiment fine from heroku. But whenever I create a HIT in psiturk and run it I get this.

Screen Shot 2021-05-10 at 9.34.13 AM.png
So I basically created a whole pipeline filled with branches of my experiment in Heroku. I tried a branch with the postgresql database that psiturk's documentation recommends, I tried one with the mysql database I was using before, I tried one where I had the database configured in both psiturk's config.txt and heroku's config variables. I tried one with just the database configured in psiturk's config.txt (btw yes for all of these allow_repeats == true).

Out of desperation I recreated the psiturk example experiment, configured that to heroku, and tried to run it off of psiturk. It worked fine the first time but the second time + I kept getting that stupid error. I'm running out of ideas. I dont knpw what else I can change. It cant be the experiment code itself since it happens with the example, I can't imagine it being the database configurations because I've tried half a dozen combinations of those, it cant be my aws credentials because my boto3 call runs fine (also if they were wrong psiturk refuses to work.) . And it can't be the version of python my code runs on because everything python in my code is python 3 compatible. (also if that were the case I wouldnt get this error in the example). 

I'm running out of ideas to try out and I have no idea why the heck this could be happening. My only guess is that its not connecting to the databases correctly even though I configure them just like the documentation says I should. The data might be going somewhere else then where I tell it to. BUt if that's the case WHERE is it going and HOW do I get it to go where I tell it to go in the config files?

da...@daveeargle.com

unread,
May 12, 2021, 6:51:25 PM5/12/21
to PsiTurk
See other thread -- `allow_repeats` should be under the "Task Parameters" section. You said you started from a scratch psiturk example experiment though, which I guess means you used the starter config file? If that's the case, I'll have to keep thinking, lmk.

Kara Schwartz

unread,
May 13, 2021, 1:52:50 PM5/13/21
to PsiTurk
yes i used the starter config file. I tried a version where I didnt modify that file at all, i tried a version where I set repeats to = true. I made sure to follow the instructions in the documentation word for word. I tried repeating everything mentioned above just in case i got lucky. But no matter what I still get that error message. The only thing that changed was this this morning when i made a new example, i was able to get trial data from that example and the aws worker dashboard actually said that I had submitted a hit, instead of being blank like it had before. But it still doesnt prevent me from getting the error.

Kara Schwartz

unread,
May 13, 2021, 1:55:48 PM5/13/21
to PsiTurk
Also I upgraded fully to psiturk 3 (which shouldnt be an issue) just in case and nothing worked. Still no improvement.

Kara Schwartz

unread,
May 13, 2021, 1:56:39 PM5/13/21
to PsiTurk
also yes allow repeats is true under task parameters section. 

On Wednesday, May 12, 2021 at 3:51:25 PM UTC-7 Dave Eargle wrote:

Dave Eargle

unread,
May 13, 2021, 7:20:28 PM5/13/21
to PsiTurk
I just ran through on a fresh-ish `psiturk-example`, and it works for me. Perhaps silly question... are you removing the semicolon from the beginning of the setting line in your config.txt? Can you share your config.txt?
Message has been deleted
Message has been deleted
Message has been deleted

Kara Schwartz

unread,
May 14, 2021, 12:31:52 PM5/14/21
to PsiTurk
####################### Psiturk Configuration Defaults #########################
#
# Example config file. Uncomment lines (remove the `;`)
# in order to override defaults.
#

############################ HIT Configuration #################################
[HIT Configuration]
# Title that will be used for the HIT when posted to mturk
# e.g.,
#     title = Stroop task
title = Stroop task

# Description that will be used for the HIT when posted to mturk
# e.g.,
#     description = Judge the color of a series of words.
description = Judge the color of a series of words.

# Keywords for the HIT on mturk
# e.g.,
#     keywords = Perception, Psychology
keywords = Perception, Psychology

# How many hours a given HIT will last on mturk before becoming unavailable
# for new assignments
#SET LIFETIME FROM 24 TO 1 FOR TESTING PURPOSES
lifetime = 1

# Whether the HIT will be restricted to US-located mturkers
;us_only = true

# Minimum approval percentage a worker must have to accept the HIT.
# Note! Mturk defaults a worker's approval percentage to 100% until
# they have completed at least 100 hits.
approve_requirement = 95

# Minimum number of HITs a worker must have had approved in order to take
# this HIT. See notes for `approve_requirement` -- set this to 100 if an actual
# `approve_requirement` percentage is wanted.
number_hits_approved = 0

# Whether a worker must have the master worker qualification to take this hit.
# Note that there is a commission surcharge for using this qualification
require_master_workers = false

# qualification_ids, commma-delimited a worker is required to have in order to
# take this HIT
;require_quals =

# qualification_ids, commma-delimited, that will disqualify a worker from
# accepting this HIT
;block_quals =

# A path to a custom JSON qualifications file, where you can define your own
# MTurk qualification requirements, as seen in advanced_quals.json.sample
# Example:
#    ;advanced_quals_path = ./advanced_quals.json
;advanced_quals_path = 

## Hit Configuration - Ad Url ##################################################
# Config settings for constructing the task's "landing page"
#
# Server domain name for publicly-accessible route to psiturk server.
# If running on heroku, set this to your heroku app url --
# e.g., "ad_url_domain = example-app.herokuapp.com"
ad_url_domain = domain I'm not going to share openly on the internet 

# Server port for publicly-accessible route to psiturk server
;ad_url_port = 443

# HTTPS protocol is required by mturk. Only change this if you have a good reason
# to do so.
;ad_url_protocol = https

# Flask route that points to the ad. "pub" and "ad" both point to the same place,
# but "pub" is safer because of potential issues with ad blockers with a route
# named "ad"
;ad_url_route = pub

# Alternatively, instead of using `ad_url_* config vars above,
# you may uncomment and use `ad_url`. You may want to use this if your
# experiment is served from a subdirectory off of the domain name. Otherwise,
# leave this as-is.
;ad_url = %(ad_url_protocol)s://%(ad_url_host)s:%(ad_url_port)s/%(ad_url_route)s

############################## Database Parameters #############################
[Database Parameters]
# Participant data will be stored in this database.
# If ON_CLOUD=1, then this defaults to env var $DATABASE_URL, if set.
#;database_url = sqlite:///participants.db
database_url = heroku postgresql url I'm not going to share openly on the internet

# Name of the database table where participant data will be stored
;table_name = assignments

############################# Server Parameters ################################
[Server Parameters]
# Host on which the psiturk gunicorn server will listen when `psiturk server on`
# is run.
#
# If env var ON_CLOUD=1, then this defaults to 0.0.0.0
;host = localhost

# Port on which the psiturk gunicorn server will listen when `psiturk server on`
# is run.
#
# If env var ON_CLOUD=1, then this defaults to $PORT env var, if set
;port = 22362

# Filename for psiturk server logging.
#
# If ON_CLOUD env var is set, then these both default to stdout (-)
#
;accesslog = /dev/null
;errorlog = server.log
# For backwards compatibility, `logfile` is synonymous with `errorlog`. If
# both are set, `errorlog` will be preferred over `logfile`.
;logfile = server.log

# Log level for the psiturk gunicorn server
;loglevel = 2

# Controls whether the dashboard is enabled
;enable_dashboard = false

# Controls whether the scheduler will run. If true, then num_threads must be 1
# Be very careful to only have one scheduler run for a given study in any
# given place! Consider running a separate psiturk server somewhere else, that
# has the same database_url and table_name settings, which you only use
# for its dashboard and task runner.
;do_scheduler = false

# Login username for the dashboard
;login_username =

# Login password for the dashboard
;login_pw =

# Number of threads for the psiturk gunicorn server to use. Leave to 1 if using
# the task runner! Otherwise, dynamically dependent on the number of cpus.
# If ON_CLOUD=1, then threads defaults to 1.
# ;threads = auto
threads = 1

# The secret key used by flask for any secure functions it uses. Not necessary
# to set unless using a secure function.
# e.g.,
#     secret_key = 'this is my secret key which is hard to guess, i should change this'
;secret_key =

# The psiturk (gunicorn) server can optionally serve traffic over https. This is
# normally not necessary if the psiturk server is set up behind a reverse proxy
# server, as is the default case with cloud hosting providers such as heroku.
#
# In reverse-proxy situations,
# the reverse proxy communicates with web browsers and other clients over https,
# while communicating on the backend with the gunicorn server over http. The
# psiturk server would only be listening on localhost and would not serve
# traffic directly.
#
# To have gunicorn use https, set both the `certfile` and `keyfile` below to point
# to a project-relative path to the public and private keys respectively.

# Project-relative path to public keyfile for ssl for gunicorn
#     certfile = <path_to.crt>
;certfile =

# Project-relative path to private keyfile for ssl for gunicron
#     keyfile = <path_to.key>
;keyfile =

# How long in seconds a gunicorn worker should wait for any synchronous calls
# to complete. This would only be relevant if one of your routes makes a
# potentially long-polling api or database call before returning.
;server_timeout = 30

################################## Task Parameters #############################
# Settings used by various task Flask routes
[Task Parameters]
# The code_version for the task. Logged as a field in the database for each
# participant, useful for data analysis. The random balanced assignment depends
# on this setting -- it will do balanced random assignment within a given codeversion.
# Can be any string value -- recommended to use semantic versioning for analysis
# sanity.
;experiment_code_version = 0.0.1

# The number of possible treatments. Used for random balanced assignment.
;num_conds = 1

# The number of possible counterbalance conditions. Used for random balanced assignment.
# If you don't know what this is, it is safe to leave it at a default of 1 and
# to only modify `num_conds` above.
;num_counters = 1

;contact_email_on_error = your...@gmail.com

# A list of web browsers, delineated by commas, that mturkers may _not_ use to
# perform the hit.
#
# The following possible values are checked by using properties on the `user_agents` python library.
#     possible values : mobile, tablet, touchcapable, pc, bot, safari
#
# Example of excluding Microsoft Internet Explorer:
#     browser_exclude_rule = MSIE
# otherwise, the string is checked against the user_agent_string. Example, to exclude
# internet explorer:
#      browser_exclude_rule : MSIE
#
# By default, MISE, mobile, and tablet are all excluded
;browser_exclude_rule = MSIE, mobile, tablet

# Whether workers can perform the hit multiple times. Enforced by the psiturk
# server; not by mturk.
allow_repeats = true

# Maximum expected time for a participant to complete the task.
# Exclusively used in determining random assignment -- basically, how long should
# a participant be given to complete the task after starting? How long should the
# task last? This is different than the `duration` specified when running
# `hit create`, because a participant may not start the task immediately after
# accepting it, while the hit `duration` starts ticking as soon as the hit is
# accepted (some workers queue their accepted hits before starting it).
;cutoff_time = 30

################################## Shell Parameters ############################
[Shell Parameters]
# the default `mode` into which the psiturk shell will be launched.
# possible values : sandbox, live
launch_in_mode = sandbox

# A file location for where to store a history of psiturk shell commands
persistent_history_file = .psiturk_history

# A default "reason" for the shell to use when granting bonuses.
# e.g.,
#     bonus_message = "Thanks for participating!"
bonus_message = "Thanks for participating!"

Kara Schwartz

unread,
May 14, 2021, 12:33:58 PM5/14/21
to PsiTurk
Also here is my config file when i print it from psiturk without the comments (for neatness's sake)

[AWS Access]
aws_access_key_id= key i'm not going to share on the internet openly
aws_secret_access_key= key i'm not going to share on the internet openly
aws_region=us-east-1

[HIT Configuration]
title=Stroop task
description=Judge the color of a series of words.
keywords=Perception, Psychology
lifetime=1
us_only=true
approve_requirement=95
number_hits_approved=0
require_master_workers=false
require_quals=
block_quals=
ad_url_domain=  heroku domain that I'm not gonna openly post here
ad_url_port=443
ad_url_protocol=https
ad_url_route=pub

[Database Parameters]
database_url= heroku postgresql url that I'm not gonna openly post here
table_name=assignments

[Server Parameters]
host=localhost
port=22362
accesslog=/dev/null
errorlog=server.log
loglevel=2
enable_dashboard=false
do_scheduler=false
login_username=
login_pw=
threads=1
secret_key=
certfile=
keyfile=
server_timeout=30
logfile=server.log

[Task Parameters]
experiment_code_version=0.0.1
num_conds=1
num_counters=1
contact_email_on_error=your...@gmail.com
browser_exclude_rule=MSIE, mobile, tablet
allow_repeats=true
cutoff_time=30

[Shell Parameters]
launch_in_mode=sandbox
persistent_history_file=.psiturk_history
bonus_message="Thanks for participating!"

[psiTurk Access]
psiturk_access_key_id=key i'm not going to share on the internet openly
psiturk_secret_access_id= key i'm not going to share on the internet openly

Dave Eargle

unread,
May 17, 2021, 4:50:19 PM5/17/21
to PsiTurk
Reporting back to the google group after I helped 1-on-1. kschwartz gave me collaborator access to the heroku app -- I don't normally do this, but we needed to rule out a psiturk bug -- and I poked around. Long story short, the heroku git repo had not been updated after the initial push, so everything there was still at the psiturk-example default state. Printouts of the config above therefore were not reflective of what the herokuapp was using. I own this as a shortcoming of the documentation for not making the heroku-git flow more clear to psiturk users.

A note to others reading this thread -- if you're getting dissonant states between your local config and your heroku-deployed psiturk app, you can run the following command to see what your heroku psiturk app thinks the config is:

`heroku run psiturk config print`

That is to say `heroku run <anything>` you can run normal shell commands, and `config print` is a psiturk shell command, and any shell command can be run from a terminal shell by prepending with `psiturk`. The `heroku run` commands spins up a one-off dyno to run your command against. It will not impact any dyno you have running that is handling web requests.

--
You received this message because you are subscribed to a topic in the Google Groups "PsiTurk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/psiturk/awS_uicR5AI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to psiturk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psiturk/401661ca-6c87-4d87-9e51-1c3353571e8dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages