-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Expected Behavior
I tried printing a pyactionnetwork.models.Tagging instance and I got:
[...]
File ".venv/lib/python3.10/site-packages/pyactionnetwork/models.py", line 89, in __repr__
return 'Tagging(id={0}, name={1})'.format(self.id, self.name)
AttributeError: 'Tagging' object has no attribute 'name'
It should just print the id probably.
Current Behavior
An AttributeError is thrown
Possible Solution
Line 89 should probably be:
return 'Tagging(id={0})'.format(self.id)
Steps to Reproduce (for bugs)
Using my branch here https://github.com/fishinthecalculator/pyactionnetwork/tree/issue-21
from pyactionnetwork import ActionNetworkApi
from pyactionnetwork.models import Tagging
from pyactionnetwork.helpers import get_all_resource
an_id = "AN_UUID"
api = ActionNetworkApi("a-secret")
url = f"https://actionnetwork.org/api/v2/people/{an_id}/taggings"
response = get_all_resource("taggings", Tagging, api, url=url)
print(response)
Context
I was just trying to print some Taggings for debugging purposes.
Your Environment
- Version used (if applicable):
latest available on pypi
- Operating System and version (desktop or mobile) (if applicable):
poetry --version
Poetry version 1.1.12
poetry run python --version
Python 3.10.7
Linux 6.8.8 #1 SMP PREEMPT_DYNAMIC 1 x86_64 GNU/Linux
- Link to your project (if applicable):
the code is not public :(
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels