Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_attributes() raises AttributeError on Office example #1259

Open
jkirsch-patreon opened this issue Nov 8, 2024 · 1 comment
Open

get_attributes() raises AttributeError on Office example #1259

jkirsch-patreon opened this issue Nov 8, 2024 · 1 comment

Comments

@jkirsch-patreon
Copy link

Using the office model from examples, Office.get_attributes() raises an AttributeError exception.

>>> Office.get_attributes()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dev/patreon_py/venv/lib/python3.9/site-packages/pynamodb/attributes.py", line 554, in __repr__
    fields = ', '.join(f'{k}={v!r}' for k, v in self.attribute_values.items())
  File "/home/dev/patreon_py/venv/lib/python3.9/site-packages/pynamodb/attributes.py", line 1095, in __getattr__
    raise AttributeError("'{}' has no attribute '{}'".format(self.__class__.__name__, attr))
AttributeError: 'Location' has no attribute 'attribute_values'
@jkirsch-patreon
Copy link
Author

But Thread.get_attributes() from examples does not. I believe it is due to attributes of Office which are subclass of MapAttribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant