Unwind
A simple solution to analysis and extract information from traceback
install
pip install unwind
usage
from unwind import Report
with Report() as report:
a = 1
b = 2
c = 'a'
d = 1 + c
print(report.errors[0])
print(report.reports[0])
'''
(<class 'TypeError'>, TypeError("unsupported operand type(s) for +: 'int' and 'str'"), <traceback object at xxxxx>)
---------report--------
info = _TraceContext(file='xxxxxx', line=7, name='<module>', code='d = 1 + c', locals={...})
flag = operate
args = {'c': 'a'}
---------end------
'''
or
from unwind import get_report
try:
a = 1
b = 2
c = 'a'
d = 1 + c
except Exception as e:
print(get_report(e))
Release files for unwind 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| unwind-0.4.0.tar.gz | 7.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| unwind-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.0 kB
Release files / unwind-0.4.0.tar.gz
| Download URL | unwind-0.4.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a31a9f7ebaddf7eff0545055bcb601386b85b8631e6ab622140b07c64d77d2eb
|
|
BLAKE2b-256 checksum How to use checksums |
528f88dd8cd4b658b4697bee1a37193a5f4afdb243e83f6e925b56e3bd6334e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.1.3 CPython/3.8.6
|
Release files / unwind-0.4.0-py3-none-any.whl
| Download URL | unwind-0.4.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db1cf2ade01fadbefb56bbce81c2c49f1710453b4fcbcef415df59c4c3711b9d
|
|
BLAKE2b-256 checksum How to use checksums |
96624dd1fda0a2e81db21f9d070313b7bef4e948cca0dd9e7b919eba1f4fe01d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.1.3 CPython/3.8.6
|