Amit Tripathi
Amit Tripathi

Reputation: 7263

Heroku Flask-SocketIO Error __init__() got an unexpected keyword argument 'server_hostname

I was working on a web app that uses Flask-SocketsIO. While trying to deploy the webapp on heroku I ran into this issue:

__init__() got an unexpected keyword argument 'server_hostname'

How to resolve this?

Upvotes: 1

Views: 622

Answers (1)

Amit Tripathi
Amit Tripathi

Reputation: 7263

This is a bug: Github

Heroku uses python-2.7.9 by default.

According to above link it is fixed but I think this bug still persists, atleast with heroku's python.

Till the time this bug is fixed a simple solution is degrading python to 2.7.8. To do this in heroku, create a file called runtime.txt and type python-2.7.8 in it. Push the update to heroku.

This should fix the issue.

After doing this my app is working :) : http://mycodebuddy.herokuapp.com/

Upvotes: 1

Related Questions