按照Heroku的Python入门教程,我遇到了一个错误
当我运行:
heroku local web
我得到错误:
internal/fs/utils.js:269
throw err;
^
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (fs.js:568:3)
at tryReadSync (fs.js:353:20)
at Object.readFileSync (fs.js:390:19)
at loadEnvsFile (/usr/local/Cellar/heroku/7.59.0/libexec/node_modules/foreman/lib/envs.js:132:15)
at Array.map (<anonymous>)
at loadEnvs (/usr/local/Cellar/heroku/7.59.0/libexec/node_modules/foreman/lib/envs.js:147:30)
at Command.<anonymous> (/usr/local/Cellar/heroku/7.59.0/libexec/node_modules/foreman/nf.js:72:16)
at Command.listener (/usr/local/Cellar/heroku/7.59.0/libexec/node_modules/foreman/node_modules/commander/index.js:315:8)
at Command.emit (events.js:314:20)
at Command.parseArgs (/usr/local/Cellar/heroku/7.59.0/libexec/node_modules/foreman/node_modules/commander/index.js:654:12) {
errno: -21,
syscall: 'read',
code: 'EISDIR'
}
这个错误是由于我使用。env作为我的python venv文件夹
python3.9 -m venv .env --prompt='heroku-getting-started'
看起来heroku的python入门期望.env
是这个
$ cat .env
TIMES=2
我最终将python venv移动到.venv
,错误消失了