【问题标题】:Error when deploying the project to Heroku将项目部署到 Heroku 时出错
【发布时间】:2020-10-30 15:56:00
【问题描述】:

我正在尝试将我的项目部署到 Heroku(我正在做 Python CrashCourse 项目)。但是当我输入命令时:heroku ps

Warning: heroku update available from 7.46.2 to 7.47.0.
(node:16428) SyntaxError Plugin: heroku: C:\Users\vlado\AppData\Local\heroku\config.json: Unexpected string in JSON at position 72
module: @oclif/config@1.13.2
task: runHook prerun
plugin: heroku
root: H:\Program Files H\heroku\client
See more details with DEBUG=*
Free dyno hours quota remaining this month: 550h 0m (100%)
Free dyno usage for this app: 0h 0m (0%)
For more information on dyno sleeping and how to upgrade, see:
https://devcenter.heroku.com/articles/dyno-sleeping

=== web (Free): gunicorn learning_log.wsgi --log-file - (1)
web.1: **crashed** 2020/10/29 18:25:25 +0100 (~ 7m ago)

粗体的崩溃不应该存在。可能也在第一行中的 SyntaxError 插件和 JSON 中的意外字符串...

然后当我打开 Heroku 时,我的项目将无法加载并显示错误。

你能帮我解决这个问题吗?

【问题讨论】:

    标签: python heroku


    【解决方案1】:

    您应该在这里找到类似的问题和答案:
    Syntax error when start $ heroku open

    如果这无助于发布有问题的日志和 json 文件

    【讨论】:

    • 我重新安装了 Heroku,现在我没有 json 错误,但我仍然无法运行我的项目。它向我显示了应用程序错误。这是我输入命令 heroku ps 后显示的内容。不再有 json 错误警告:heroku 更新可从 7.46.2 到 7.47.0。本月剩余的免费 dyno 小时配额:550h 0m (100%) 此应用程序的免费 dyno 使用量:0h 0m (0%) 有关 dyno 睡眠和如何升级的更多信息,请参阅:=== 网络(免费):gunicorn learning_log .wsgi --log-file - (1) web.1: crashed 2020/10/29 19:41:51 +0100 (~ 1h ago)
    • 你的 requirements.txt 中有 gunicorn 吗? + 请发布日志
    • 嗯,有一个命令 pip freeze > requirements.txt 到虚拟环境,但我没有这样做,因为我做不到。它向我显示了这个错误: Traceback(最近一次调用最后一次):文件“C:\Users\vlado\AppData\Local\Programs\Python\Python38-32\lib\runpy.py”,第 194 行,在 run_module_as_main return _run_code(code, main_globals, None, exec(code, run_globals) File "D:\VLAD-všetko\Programovanie\Python\\PYTHON PROJECTS\Web Application\learning_log\ll_env\Scripts\pip.exe__main_.py ",第 5 行,在 ModuleNotFoundError: No module named 'pip._internal.cli.main'
    • 请问如何生成日志?
    猜你喜欢
    • 2021-12-14
    • 1970-01-01
    • 2017-05-21
    • 2015-04-07
    • 2021-01-19
    • 2016-01-11
    • 2020-10-24
    • 2013-04-14
    • 1970-01-01
    相关资源
    最近更新 更多