poetry: EmptyKeyError when running poetry shell

  • [x ] I am on the latest Poetry version.
  • [ x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x ] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

When trying to run poetry shell, I get an EmptyKeyError:

% poetry shell

  EmptyKeyError

  Empty key at line 12 col 0

  at ~/.poetry/lib/poetry/_vendor/py3.7/tomlkit/parser.py:371 in _parse_key_value
       367│ 
       368│         # Key
       369│         key = self._parse_key()
       370│         if not key.key.strip():
    →  371│             raise self.parse_error(EmptyKeyError)
       372│ 
       373│         self.mark()
       374│ 
       375│         found_equals = self._current == "="

Please help. I don’t seem to find any similar issue on the internet, and believe this is not a duplication of an existing question.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 15 (6 by maintainers)

Most upvoted comments

thank you @abn , there was an extra " on line 12 in my envs.toml file. after removing that, everything is now back to normal!