Python 由于缺少Procfile,使用heroku在本地运行Django失败

Python 由于缺少Procfile,使用heroku在本地运行Django失败,python,django,heroku,deployment,procfile,Python,Django,Heroku,Deployment,Procfile,我有一个Django 1.11/Python3.5应用程序,我构建了这个应用程序,希望在Heroku本地运行。这是一个使用GitHub()上提供的Heroku Django模板的简单SPA。我遵循了Heroku教程(),但似乎无法使用以下命令在本地运行应用程序: heroku local web heroku local 运行此命令会产生以下错误: return binding.open(pathModule._makeLong(path), stringToFlags(flags), mo

我有一个Django 1.11/Python3.5应用程序,我构建了这个应用程序,希望在Heroku本地运行。这是一个使用GitHub()上提供的Heroku Django模板的简单SPA。我遵循了Heroku教程(),但似乎无法使用以下命令在本地运行应用程序:

heroku local web
heroku local
运行此命令会产生以下错误:

return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: EACCES: permission denied, open '.env'
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:491:33)
    at loadEnvsFile (/snap/heroku/414/lib/node_modules/heroku-cli/node_modules/foreman/lib/envs.js:133:15)
    at Array.map (native)
    at loadEnvs (/snap/heroku/414/lib/node_modules/heroku-cli/node_modules/foreman/lib/envs.js:148:30)
    at Command.<anonymous> (/snap/heroku/414/lib/node_modules/heroku-cli/node_modules/foreman/nf.js:72:16)
    at Command.listener (/snap/heroku/414/lib/node_modules/heroku-cli/node_modules/commander/index.js:301:8)
    at emitTwo (events.js:106:13)
    at Command.emit (events.js:194:7)
    at Command.parseArgs (/snap/heroku/414/lib/node_modules/heroku-cli/node_modules/commander/index.js:615:12)
[WARN] EACCES: permission denied, open 'Procfile'
[FAIL] No Procfile and no package.json file found in Current Directory - See run.js --help
 ▸    Cannot convert undefined or null to object
我在.env上运行了chmod 777,但得到了相同的错误

当我运行以下命令时:

heroku local web
heroku local
我得到以下错误:

return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: EACCES: permission denied, open '.env'
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:491:33)
    at loadEnvsFile (/snap/heroku/414/lib/node_modules/heroku-cli/node_modules/foreman/lib/envs.js:133:15)
    at Array.map (native)
    at loadEnvs (/snap/heroku/414/lib/node_modules/heroku-cli/node_modules/foreman/lib/envs.js:148:30)
    at Command.<anonymous> (/snap/heroku/414/lib/node_modules/heroku-cli/node_modules/foreman/nf.js:72:16)
    at Command.listener (/snap/heroku/414/lib/node_modules/heroku-cli/node_modules/commander/index.js:301:8)
    at emitTwo (events.js:106:13)
    at Command.emit (events.js:194:7)
    at Command.parseArgs (/snap/heroku/414/lib/node_modules/heroku-cli/node_modules/commander/index.js:615:12)
[WARN] EACCES: permission denied, open 'Procfile'
[FAIL] No Procfile and no package.json file found in Current Directory - See run.js --help
 ▸    Cannot convert undefined or null to object
我的proc文件如下所示:

WEB_CONCURRENCY=3
SECRET_APP_KEY="xxxxxxxxxxxxxxxxxxxx"
web: gunicorn personal_website.wsgi
现在我无法理解为什么在运行“heroku local web”时会出现前面提到的错误,特别是在授予必要的权限之后

另外,其他人在运行“heroku local”时也出现了同样的错误,但答案是“确保Procfile的格式正确”。我的是正确的,并尝试了许多变体

我见过其他人在这个问题上如此,有些问题已经解决,不幸的是,对我来说,没有一个有效


我可能在这里做错了什么?

您的
Procfile
的权限是什么?我已经运行了
chmod 777 Procfile
。我已经确认,在运行heroku django模板时会出现相同的错误()。您使用的是什么操作系统/版本?@wasabigeek Ubuntu 16.04