I successfully deployed my app to heroku but now I am getting an error:
ImportError at /
cannot import name 'fromshare' from 'socket' (/app/.heroku/python/lib/python3.9/socket.py)
Looks like it traces back to:
File "/app/users/forms.py" in <module>
1. from socket import fromshare
I have looked everywhere I can online and have not seen anyone run into this. Any idea how I would fix this?
CodePudding user response:
socket.fromshare()
is only available on Windows. You won't be able to use it on Heroku since its dynos run Linux.
Without a lot more contect I can't recommend an alternative, but that's the root cause of your issue.
CodePudding user response:
Try removing from socket import fromshare
from the file. Seeing how it's for a forms.py file, I don't think you need to import that module.