Skip to content

str() on a FixedLengthError instance crashes with AttributeError #2

Open

Description

@dargueta
  • FWFFR version: 0.4.0
  • Python version: 3.7
  • Operating System: Ubuntu, OSX

Description

Tried calling str() on a caught exception and it blew up.

What I Did

>>> import fwffr                                                                                                                                                                                                

>>> str(fwffr.FixedLengthError("asdf"))                                                                                                                                                                         
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/diegoargueta/.pyenv/versions/3.7.6/envs/gds3/lib/python3.7/site-packages/fwffr.py", line 31, in __str__
    return self.message
AttributeError: 'FixedLengthError' object has no attribute 'message'

'FixedLengthError' object has no attribute 'message'

Either this should be an abstract base class or some tweaking is needed for rendering the error message.

Activity

  1. added a commit that references this issue on Feb 9, 2022
    8f5ef52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions