首页 > 解决方案 > Heroku:ModuleNotFoundError:没有命名的模块

问题描述

我尝试使用 Heroku 创建应用程序,但总是遇到问题我使用了一个名为 _pymaxwell5.pyd 的模块,在 pycharm 中脚本工作正常。这是链接存储库到 Heroku maxwell github的链接

错误日志:

$ heroku logs --tail
2021-04-02T08:10:18.055183+00:00 heroku[worker.1]: State changed from up to crashed
2021-04-02T09:10:17.124398+00:00 heroku[worker.1]: State changed from crashed to starting
2021-04-02T09:10:24.139370+00:00 heroku[worker.1]: Starting process with command `python maxwell.py`
2021-04-02T09:10:24.892275+00:00 heroku[worker.1]: State changed from starting to up
2021-04-02T09:10:28.475500+00:00 app[worker.1]: Traceback (most recent call last):
2021-04-02T09:10:28.475562+00:00 app[worker.1]: File "/app/maxwell.py", line 7, in <module>
2021-04-02T09:10:28.476173+00:00 app[worker.1]: import pymaxwell5 as pym
2021-04-02T09:10:28.476174+00:00 app[worker.1]: ModuleNotFoundError: No module named 'pymaxwell5'
2021-04-02T09:10:28.639395+00:00 heroku[worker.1]: Process exited with status 1
2021-04-02T09:10:28.705634+00:00 heroku[worker.1]: State changed from up to crashed
2021-04-02T11:12:56.320516+00:00 heroku[worker.1]: State changed from crashed to starting
2021-04-02T11:13:07.359240+00:00 heroku[worker.1]: Starting process with command `python maxwell.py`
2021-04-02T11:13:08.264270+00:00 heroku[worker.1]: State changed from starting to up
2021-04-02T11:13:11.305695+00:00 app[worker.1]: Traceback (most recent call last):
2021-04-02T11:13:11.305768+00:00 app[worker.1]: File "/app/maxwell.py", line 7, in <module>
2021-04-02T11:13:11.306033+00:00 app[worker.1]: import pymaxwell5 as pym
2021-04-02T11:13:11.306161+00:00 app[worker.1]: ModuleNotFoundError: No module named 'pymaxwell5'
2021-04-02T11:13:11.462360+00:00 heroku[worker.1]: Process exited with status 1

在此处输入图像描述

标签: heroku

解决方案


推荐阅读