heroku python 入门教程 EISDIR 报错

heroku python getting started tutorial EISDIR error

按照 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'
}

此错误是我对我的 python venv 文件夹使用 .env 的结果

python3.9 -m venv .env --prompt='heroku-getting-started'

看起来像 heroku 的 python-getting-started 期望 .env 是这样的

$ cat .env
TIMES=2

我最终将 python venv 移至 .venv,错误消失了