Worker failed to boot gunicorn error

1,797 views
Skip to first unread message

Caleb Mahlen

unread,
Oct 22, 2020, 8:36:07 PM10/22/20
to PsiTurk
Hello everyone,

I recently updated my operating system, and psiturk stopped working. I uninstalled and reinstalled psiturk, and now I am getting the following error: 

[psiTurk server:off mode:sdbx #HITs:0]$ server on

Experiment server launching...

Now serving on http://localhost:22362

/Users/caleb/opt/anaconda3/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used

  return io.open(fd, *args, **kwargs)

[psiTurk server:on mode:sdbx #HITs:0]$ Traceback (most recent call last):

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 210, in run

    self.sleep()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 360, in sleep

    ready = select.select([self.PIPE[0]], [], [], 1.0)

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

    self.reap_workers()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-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>


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 107, in <module>

    launch()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 103, in launch

    ExperimentServer().run()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 223, in run

    super(Application, self).run()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 72, in run

    Arbiter(self).run()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 232, in run

    self.halt(reason=inst.reason, exit_status=inst.exit_status)

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 345, in halt

    self.stop()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 393, in stop

    time.sleep(0.1)

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

    self.reap_workers()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-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>


I am not really sure what to do. Here is my program server log (it's a little long, sorry): 


[2020-10-22 18:14:52 -0600] [98446] [ERROR] Exception in worker process

Traceback (most recent call last):

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

    worker.init_process()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process

    self.load_wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

    self.wsgi = self.app.wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi

    self.callable = self.load()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load

    return util.import_app("psiturk.experiment:app")

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app

    __import__(module)

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>

    from custom import custom_code

  File "/Users/caleb/desktop/psiturk-example/custom.py", line 61

    try:

       ^

TabError: inconsistent use of tabs and spaces in indentation

[2020-10-22 18:14:52 -0600] [98448] [ERROR] Exception in worker process

Traceback (most recent call last):

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

    worker.init_process()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process

    self.load_wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

    self.wsgi = self.app.wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi

    self.callable = self.load()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load

    return util.import_app("psiturk.experiment:app")

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app

    __import__(module)

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>

    from custom import custom_code

  File "/Users/caleb/desktop/psiturk-example/custom.py", line 61

    try:

       ^

TabError: inconsistent use of tabs and spaces in indentation

[2020-10-22 18:14:52 -0600] [98449] [ERROR] Exception in worker process

Traceback (most recent call last):

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

    worker.init_process()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process

    self.load_wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

    self.wsgi = self.app.wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi

    self.callable = self.load()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load

    return util.import_app("psiturk.experiment:app")

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app

    __import__(module)

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>

    from custom import custom_code

  File "/Users/caleb/desktop/psiturk-example/custom.py", line 61

    try:

       ^

TabError: inconsistent use of tabs and spaces in indentation

[2020-10-22 18:14:52 -0600] [98447] [ERROR] Exception in worker process

Traceback (most recent call last):

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

    worker.init_process()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process

    self.load_wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

    self.wsgi = self.app.wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi

    self.callable = self.load()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load

    return util.import_app("psiturk.experiment:app")

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app

    __import__(module)

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>

    from custom import custom_code

  File "/Users/caleb/desktop/psiturk-example/custom.py", line 61

    try:

       ^

TabError: inconsistent use of tabs and spaces in indentation

[2020-10-22 18:14:52 -0600] [98450] [ERROR] Exception in worker process

Traceback (most recent call last):

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

    worker.init_process()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process

    self.load_wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

    self.wsgi = self.app.wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi

    self.callable = self.load()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load

    return util.import_app("psiturk.experiment:app")

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app

    __import__(module)

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>

    from custom import custom_code

  File "/Users/caleb/desktop/psiturk-example/custom.py", line 61

    try:

       ^

TabError: inconsistent use of tabs and spaces in indentation

[2020-10-22 18:14:52 -0600] [98451] [ERROR] Exception in worker process

Traceback (most recent call last):

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

    worker.init_process()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process

    self.load_wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

    self.wsgi = self.app.wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi

    self.callable = self.load()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load

    return util.import_app("psiturk.experiment:app")

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app

    __import__(module)

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>

    from custom import custom_code

  File "/Users/caleb/desktop/psiturk-example/custom.py", line 61

    try:

       ^

TabError: inconsistent use of tabs and spaces in indentation

[2020-10-22 18:14:52 -0600] [98452] [ERROR] Exception in worker process

Traceback (most recent call last):

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

    worker.init_process()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process

    self.load_wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

    self.wsgi = self.app.wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi

    self.callable = self.load()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load

    return util.import_app("psiturk.experiment:app")

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app

    __import__(module)

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>

    from custom import custom_code

  File "/Users/caleb/desktop/psiturk-example/custom.py", line 61

    try:

       ^

TabError: inconsistent use of tabs and spaces in indentation

[2020-10-22 18:14:52 -0600] [98453] [ERROR] Exception in worker process

Traceback (most recent call last):

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

    worker.init_process()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process

    self.load_wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

    self.wsgi = self.app.wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi

    self.callable = self.load()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load

    return util.import_app("psiturk.experiment:app")

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app

    __import__(module)

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>

    from custom import custom_code

  File "/Users/caleb/desktop/psiturk-example/custom.py", line 61

    try:

       ^

TabError: inconsistent use of tabs and spaces in indentation

[2020-10-22 18:14:52 -0600] [98454] [ERROR] Exception in worker process

Traceback (most recent call last):

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

    worker.init_process()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process

    self.load_wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

    self.wsgi = self.app.wsgi()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi

    self.callable = self.load()

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load

    return util.import_app("psiturk.experiment:app")

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app

    __import__(module)

  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>

    from custom import custom_code

  File "/Users/caleb/desktop/psiturk-example/custom.py", line 61

    try:

       ^

TabError: inconsistent use of tabs and spaces in indentation


Dave Eargle

unread,
Oct 22, 2020, 9:24:24 PM10/22/20
to Caleb Mahlen, PsiTurk
" TabError: inconsistent use of tabs and spaces in indentation" in custom.py. Your custom.py is broken! Try just deleting it if you don't need it, I think that works for the version you're using.

--
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/f6869970-7ed1-427f-b800-94eb07961cfbn%40googlegroups.com.

Caleb Mahlen

unread,
Oct 23, 2020, 12:37:47 PM10/23/20
to PsiTurk
Thank you! So I deleted the custom.py file, and I get the same error in the terminal as I did before, but it looks like my server.log is saying that now there is no module called custom at the end:

2020-10-23 10:33:59,582 There is custom code (custom.py) associated with this                           project but it doesn't import cleanly.  Raising exception,
[2020-10-23 10:33:59 -0600] [3105] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load
    return util.import_app("psiturk.experiment:app")
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>
    from custom import custom_code
ModuleNotFoundError: No module named 'custom'
2020-10-23 10:33:59,648 There is custom code (custom.py) associated with this                           project but it doesn't import cleanly.  Raising exception,
[2020-10-23 10:33:59 -0600] [3106] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load
    return util.import_app("psiturk.experiment:app")
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>
    from custom import custom_code
ModuleNotFoundError: No module named 'custom'
2020-10-23 10:33:59,876 There is custom code (custom.py) associated with this                           project but it doesn't import cleanly.  Raising exception,
[2020-10-23 10:33:59 -0600] [3107] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load
    return util.import_app("psiturk.experiment:app")
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>
    from custom import custom_code
ModuleNotFoundError: No module named 'custom'
2020-10-23 10:33:59,900 There is custom code (custom.py) associated with this                           project but it doesn't import cleanly.  Raising exception,
[2020-10-23 10:33:59 -0600] [3108] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load
    return util.import_app("psiturk.experiment:app")
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>
    from custom import custom_code
ModuleNotFoundError: No module named 'custom'
2020-10-23 10:33:59,991 There is custom code (custom.py) associated with this                           project but it doesn't import cleanly.  Raising exception,
2020-10-23 10:33:59,994 There is custom code (custom.py) associated with this                           project but it doesn't import cleanly.  Raising exception,
[2020-10-23 10:33:59 -0600] [3109] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load
    return util.import_app("psiturk.experiment:app")
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>
    from custom import custom_code
ModuleNotFoundError: No module named 'custom'
[2020-10-23 10:33:59 -0600] [3110] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load
    return util.import_app("psiturk.experiment:app")
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>
    from custom import custom_code
ModuleNotFoundError: No module named 'custom'
2020-10-23 10:34:00,031 There is custom code (custom.py) associated with this                           project but it doesn't import cleanly.  Raising exception,
[2020-10-23 10:34:00 -0600] [3111] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load
    return util.import_app("psiturk.experiment:app")
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>
    from custom import custom_code
ModuleNotFoundError: No module named 'custom'
2020-10-23 10:34:00,122 There is custom code (custom.py) associated with this                           project but it doesn't import cleanly.  Raising exception,
[2020-10-23 10:34:00 -0600] [3112] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load
    return util.import_app("psiturk.experiment:app")
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>
    from custom import custom_code
ModuleNotFoundError: No module named 'custom'
2020-10-23 10:34:00,169 There is custom code (custom.py) associated with this                           project but it doesn't import cleanly.  Raising exception,
[2020-10-23 10:34:00 -0600] [3113] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment_server.py", line 48, in load
    return util.import_app("psiturk.experiment:app")
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/Users/caleb/opt/anaconda3/lib/python3.8/site-packages/psiturk/experiment.py", line 77, in <module>
    from custom import custom_code
ModuleNotFoundError: No module named 'custom'


Dave Eargle

unread,
Oct 23, 2020, 1:56:50 PM10/23/20
to Caleb Mahlen, PsiTurk
eh, sounds like your version of psiturk doesn't have the right checks to allow for the absence of a custom.py. You can just run `psiturk-setup-example` in another directory and copy the `custom.py` out of there and into your directory.

Caleb Mahlen

unread,
Oct 30, 2020, 12:57:19 AM10/30/20
to PsiTurk
That worked! Thank you so much!
Reply all
Reply to author
Forward
0 new messages