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.

Missing `license` key explodes rather than logging a useful message

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: macOS 10.14
  • Poetry version: 0.12.0

Issue

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?).

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
sdispatercommented, Oct 17, 2018

Sorry about that!

I just published a new release with this bug fixed.

2reactions
jacebrowningcommented, Oct 17, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

The Log: What every software engineer should know about ...
But this very abstraction is ideal for supporting all kinds of messaging, data flow, and real-time data processing. Logs in distributed systems.
Read more >
quick heal product key lost - Spybot Search and Destroy License ...
The application is free from logs and acceleration errors that free fall the systems in danger zone. However, you can enroll more than...
Read more >
License Key Server Administration Agent FAQs - IBM
Consult these frequently asked questions (FAQs) about License Key Server Administration Agent. Attention: The license server log files ( lmgrd.log , lmgrd.log.
Read more >
php 8.1 - explode(): Passing null to parameter #2 ($string) of ...
Now I have thousands of occurrences across my code where I have to put a (string) in front of parameters, which just bloats...
Read more >
I have lost my executable association. - ITPro Today
A. If your computer configuration has been corrupted and executable files no longer behave correctly perform the following from the command prompt (cmd.exe)....
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