question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EmptyKeyError when running poetry shell

See original GitHub issue
  • [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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jane-meichen-chencommented, Aug 26, 2020

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

0reactions
albertoem77commented, Sep 22, 2022

okay thanks you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Commands | master | Documentation | Poetry - Python ...
By default poetry will install your project's package every time you run install : ... The shell command spawns a shell, according to...
Read more >
Configure a Poetry environment | PyCharm Documentation
Poetry is a tool that facilitates creating a Python virtual environment based on the project ... To verify the installation, run the following...
Read more >
Poetry: How to keep using the old virtual environment when ...
When I do that and run poetry shell poetry creates a new virtual environment. But I don't want a new virtual environment, I...
Read more >
Poetry | Dev Cheatsheets - Michael Currin
Activate environment. This creates a subshell, so when you exit the subshell no changes are persisted. $ poetry shell.
Read more >
A Poetic Apology. Or Why Should You Use Poetry to Manage…
poetry run python data.py. which will execute the command within the project's virtualenv. Alternatively, you can spawn a shell within the active venv ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found