grocy.update_generic Entity_type not callable #160
-
Hi, i dont get the entity_type called. The request does not grab a entity. How can i select the entity_type?
Many thanks . best regards, Phil |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Can you assist me in this case? Syntax is unclear for me to trigger the API correctly. `Traceback (most recent call last):
File "r\PycharmProjects\pythonProject\venv\lib\site-packages\pygrocy\grocy.py", line 219, in update_generic AttributeError: 'str' object has no attribute 'value'` Best regards, Phil |
Beta Was this translation helpful? Give feedback.
-
Hi,
grocy.update_generic(entity_type=EntityType.LOCATIONS, object_id=9, updated_data={ "id": "8", "name": "Cookies4"}) |
Beta Was this translation helpful? Give feedback.
-
Yes it is. Thank you very much. :-)
…On März 19 2021, at 7:50 am, Sebastian Rutofski ***@***.***> wrote:
@horphi0815 ***@***.***/0?redirect=https%3A%2F%2Fgithub.com%2Fhorphi0815&recipient=cmVwbHkrQUpRNExJQUFQRUVVNlNNUUZINk5QSkY2TUFWSlZFVkJNWEhBQU1PVFpNQHJlcGx5LmdpdGh1Yi5jb20%3D) Is this issue solved?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub ***@***.***/1?redirect=https%3A%2F%2Fgithub.com%2FSebRut%2Fpygrocy%2Fdiscussions%2F160%23discussioncomment-501849&recipient=cmVwbHkrQUpRNExJQUFQRUVVNlNNUUZINk5QSkY2TUFWSlZFVkJNWEhBQU1PVFpNQHJlcGx5LmdpdGh1Yi5jb20%3D), or unsubscribe ***@***.***/2?redirect=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJQ4LIHMJZN6JTDAFUYFENLTELXZVANCNFSM4ZOGEA7Q&recipient=cmVwbHkrQUpRNExJQUFQRUVVNlNNUUZINk5QSkY2TUFWSlZFVkJNWEhBQU1PVFpNQHJlcGx5LmdpdGh1Yi5jb20%3D).
|
Beta Was this translation helpful? Give feedback.
Hi,
update_generic
expects anEntityType
(as stated in the docs ;)). So you would need to change your code to something like this: