My Flask app uses function from pyd file which is in the same folder and everything works fine on the local server. However, as soon as I push everything to Heroku, the app crashes, and Heroku logs give:
2020-06-05T20:23:42.103623+00:00 app[web.1]: File "/app/app.py", line 13, in <module>
2020-06-05T20:23:42.103623+00:00 app[web.1]: from quaternion_calculation import quaternion_calculation
2020-06-05T20:23:42.103624+00:00 app[web.1]: ModuleNotFoundError: No module named 'quaternion_calculation'
2020-06-05T20:23:42.103901+00:00 app[web.1]: [2020-06-05 20:23:42 +0000] [10] [INFO] Worker exiting (pid: 10)
2020-06-05T20:23:42.304170+00:00 app[web.1]: [2020-06-05 20:23:42 +0000] [4] [INFO] Shutting down: Master
2020-06-05T20:23:42.304244+00:00 app[web.1]: [2020-06-05 20:23:42 +0000] [4] [INFO] Reason: Worker failed to boot.
2020-06-05T20:23:42.387177+00:00 heroku[web.1]: Process exited with status 3
2020-06-05T20:23:42.427398+00:00 heroku[web.1]: State changed from up to crashed
I spent many hours on this and struggling even to understand how it works locally but fails on Heroku. Using heroku run bash / ls:
app.py data.json geolocator hangman lib
Procfile __pycache__ Q quaternion_calculation.pyd requirements.txt
runtime.txt static steps.txt templates
I can see that pyd file in there, so why import fails and module is not found in Heroku while it is ok when server is run locally?