-vvv option).After updating to 0.12.0, almost all commands fail because my pyproject.toml doesn't have a license field.
Verbose output:
> poetry shell -vvv
[AttributeError]
'NoneType' object has no attribute 'lower'
Exception trace:
/Users/seankelley/.poetry/lib/poetry/_vendor/py3.6/cleo/application.py in run() at line 94
status_code = self.do_run(input_, output_)
/Users/seankelley/.poetry/lib/poetry/console/application.py in do_run() at line 88
return super(Application, self).do_run(i, o)
/Users/seankelley/.poetry/lib/poetry/_vendor/py3.6/cleo/application.py in do_run() at line 197
status_code = command.run(input_, output_)
/Users/seankelley/.poetry/lib/poetry/console/commands/command.py in run() at line 77
return super(BaseCommand, self).run(i, o)
/Users/seankelley/.poetry/lib/poetry/_vendor/py3.6/cleo/commands/base_command.py in run() at line 136
self.initialize(input_, output_)
/Users/seankelley/.poetry/lib/poetry/console/commands/env_command.py in initialize() at line 16
o, self.poetry.package.name, cwd=self.poetry.file.parent
/Users/seankelley/.poetry/lib/poetry/console/commands/command.py in poetry() at line 62
return self.get_application().poetry
/Users/seankelley/.poetry/lib/poetry/console/application.py in poetry() at line 60
self._poetry = Poetry.create(os.getcwd())
/Users/seankelley/.poetry/lib/poetry/poetry.py in create() at line 120
license_ = license_by_id(local_config.get("license"))
/Users/seankelley/.poetry/lib/poetry/spdx/__init__.py in license_by_id() at line 14
id = identifier.lower()
shell
I would expect it to fail in the same way that it does for other missing keys:
[NonExistentKey]
'Key "name" does not exist.'
...or to not require a license field at all (why does it?).
Seeing how poetry init does not force you to choose a License and how it would break old projects I don't think it should be required to specify one.
I have a PR here: https://github.com/sdispater/poetry/pull/500
Here's a temporary workaround:
# pyproject.toml
[tool.poetry]
...
license = ""
Seems to be already fixed in https://github.com/sdispater/poetry/commit/bf112c2506aa90cea98ff523d71f9a0feec61367
Sorry about that!
I just published a new release with this bug fixed.
Thanks for the quick fix, looks like it works!
Most helpful comment
Sorry about that!
I just published a new release with this bug fixed.