poet
poet copied to clipboard
Poet fails if there are no dependencies
If your poetry.toml
file has no dependencies, you will get this error:
λ poet install -v
Locking dependencies to poetry.lock
- Resolving dependencies (1 sec)
- Writing dependencies
[KeyError]
'package'
Exception trace:
/users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/application.py in run() at line 95
status_code = self.do_run(input_, output_)
/users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/application.py in do_run() at line 188
status_code = command.run(input_, output_)
/users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/commands/command.py in run() at line 99
return super(Command, self).run(i, o)
/users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/commands/base_command.py in run() at line 146
status_code = self.execute(input_, output_)
/users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/console/commands/index_command.py in execute() at line 28
super(IndexCommand, self).execute(i, o)
/users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/console/commands/command.py in execute() at line 63
return super(Command, self).execute(i, o)
/users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/commands/command.py in execute() at line 108
return self.handle()
/users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/console/commands/install.py in handle() at line 33
installer.install(features=features, dev=dev)
/users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/installer.py in install() at line 59
return self.install(features=features, dev=dev)
/users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/installer.py in install() at line 61
lock = self._poet.lock
/users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/poet.py in lock() at line 199
return Lock(self.lock_file)
/users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/poet.py in __init__() at line 58
self.load()
/users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/lock.py in load() at line 17
packages = self._config['package']
install [-i|--index INDEX] [-f|--features FEATURES] [--no-dev] [--no-progress]
This is because of this line packages = self._config['package']
, assuming that there will be a package
section of the poetry.lock
file. It should be replaced with self._config.get('package', [])
.