friendly-traceback / friendly

Friendly-traceback's version used in most situations
https://friendly-traceback.github.io/docs/index.html
MIT License
42 stars 5 forks source link

friendly is broken since version 0.7.12 #45

Closed mardukbp closed 2 years ago

mardukbp commented 2 years ago

Since version 0.7.12, whenever a Python exception occurs friendly fails with a KeyError:

python36\lib\site-packages\friendly\rich_formatters.py", line 452, in _markdown
    for note in info[item]:
KeyError: 'exception_notes'

I reproduced the above with Python 3.6, 3.8 and 3.10 on Windows and Python 3.10 on Ubuntu.

I believe uploading every day a patch version to pypi is a bad idea. It is better to test thoroughly before releasing a new version.

Please remove all releases after 0.7.11 from pypi. Installing friendly should just work and not generate unfriendly stack traces ;)

aroberge commented 2 years ago

Thank you for reporting this. It is fixed now. The problem occurred as I made some changes to friendly_traceback including adding support for exception notes (new in Python 3.11), and did not tested friendly thoroughly as you pointed out. Whenever major changes are made in friendly_traceback, I hurry to upload a new version of friendly to make sure friendly does not raise exceptions due to the new features ... and missed this completelly. I completely agree that friendly should NEVER generate unfriendly stack traces.

I have uploaded a new version of both friendly and friendly_traceback. I will leave this issue open until I introduce some tests for friendly.

mardukbp commented 2 years ago

Thank you for fixing it so quickly! I already recommended friendly to a friend. And will continue to spread the word :)