This leads to a misleading error message when trying to start the psiTurk server:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/psiturk/experiment_server.py", line 108, in <module>
launch()
File "/usr/local/lib/python3.6/dist-packages/psiturk/experiment_server.py", line 104, in launch
ExperimentServer().run()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/app/base.py", line 223, in run
super(Application, self).run()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/app/base.py", line 72, in run
Arbiter(self).run()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 232, in run
self.halt(reason=inst.reason, exit_status=inst.exit_status)
File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 345, in halt
self.stop()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 393, in stop
time.sleep(0.1)
File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 245, in handle_chld
self.reap_workers()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 525, in reap_workers
raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
Checking server.log more helpfully shows that the issue results from line 109 of experiment.py:
File "/usr/local/lib/python3.6/dist-packages/psiturk/experiment.py", line 109, in <module>
from .api import api_blueprint
ModuleNotFoundError: No module named 'psiturk.api'
Indeed, neither the dashboard nor the api folder are included in /usr/local/lib/python3.6/dist-packages/psiturk. These new subpackages need to be added to setup.py.
Since https://github.com/NYUCCL/psiTurk/commit/082942d6a62465b58eaaba91bb9a3a306be41b1d, installing via GitHub (i.e.,
pip install git+https://github.com/NYUCCL/psiTurk.git@master
) leads to an installation that does not contain eitherpsiturk.dashboard
orpsiturk.api
.This leads to a misleading error message when trying to start the psiTurk server:
Checking
server.log
more helpfully shows that the issue results from line 109 ofexperiment.py
:Indeed, neither the
dashboard
nor theapi
folder are included in/usr/local/lib/python3.6/dist-packages/psiturk
. These new subpackages need to be added tosetup.py
.Either of the following fixes should work:
or