Warning

This project is being split into 3 separate projects:

  • friendly_traceback,

  • friendly, and

  • friendly_idle.

The documentation does not reflect this change.

If you are a end-user, just install friendly until further notice.

Comparing Exception messages between Python versions

In this file, we highlight differences between the messages provided by Python for all Exceptions excluding SyntaxError cases; these are covered elsewhere.

Note that the content below is extracted automaticaly by a simple program we wrote for this purpose. If the information is the same for Python 3.6 and 3.7, but changes for Python 3.8, and stays the same afterwards, we only show the differences between 3.7 and 3.8.

Circular import
3.6: cannot import name 'a'
3.7: cannot import name 'a' from 'circular_a' (C:\Users\andre\github\friendly-traceback\tests\circular_a.py)
3.8: cannot import name 'a' from partially initialized module 'circular_a' (most likely due to a circular import) (C:\Users\andre\github\friendly-traceback\tests\circular_a.py)
Circular import b
3.7: module 'circular_c' has no attribute 'something'
3.8: partially initialized module 'circular_c' has no attribute 'something' (most likely due to a circular import)
Simple import error
3.6: cannot import name 'Pi'
3.7: cannot import name 'Pi' from 'math' (unknown location)
Cannot unpack non iterable object
3.6: 'float' object is not iterable
3.7: cannot unpack non-iterable float object
Too few positional argument
3.9: fn() missing 2 required positional arguments: 'b' and 'c'
3.10: test_Too_few_positional_argument.<locals>.fn() missing 2 required positional arguments: 'b' and 'c'
Too many positional argument
3.9: f() takes 1 positional argument but 2 were given
3.10: test_Too_many_positional_argument.<locals>.A.f() takes 1 positional argument but 2 were given