mardi 24 juillet 2018

TypeError: __init__() got an unexpected keyword argument 'family_or_realsock'

I'm developing an application using Python, Flask and serving with gunicorn and eventlet (worker) but i can't deploy it on Heroku.

Locally the application is working fine and in gunicorn too. I tested it using heroku local web and honcho start (foreman for python) and its also working.

My Procfile is web: gunicorn --worker-class eventlet -w 1 run:app. When i run it using the 'heroku local web' testing tool, it works fine.

I'm using Flask-SocketIO in my project:

var socket = io.connect('http://' + document.domain + ':' + location.port)

Here's the logs from 'heroku logs --source app':

File "/app/.heroku/python/lib/python3.6/site- 
packages/gunicorn/arbiter.py", line 473, in spawn_worker
Traceback (most recent call last):
   worker.init_process()
File "/app/.heroku/python/lib/python3.6/site-
packages/gunicorn/workers/geventlet.py", line 30, in init_process
   super(EventletWorker, self).init_process()
File "/app/.heroku/python/lib/python3.6/site-
packages/gunicorn/workers/base.py", line 106, in init_process
  self.run()
File "/app/.heroku/python/lib/python3.6/site-
packages/gunicorn/workers/geventlet.py", line 49, in run
  s = GreenSocket(family_or_realsock=sock)
File "/app/.heroku/python/lib/python3.6/site-
packages/eventlet/greenio/base.py", line 135, in __init__
  fd = _original_socket(family, *args, **kwargs)
  TypeError: __init__() got an unexpected keyword argument 'family_or_realsock'




Aucun commentaire:

Enregistrer un commentaire