Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Support for Grocy 4.0 API #266

Closed
kehralexander opened this issue Aug 7, 2023 · 3 comments
Closed

Support for Grocy 4.0 API #266

kehralexander opened this issue Aug 7, 2023 · 3 comments

Comments

@kehralexander
Copy link

Yet again the grocy api changed somewhat.
One thing that does not work anymore would apparently be grocy.all_products():

Traceback (most recent call last):
  File "/builds/alexwaresystems/mink/grocy-backup/export.py", line 23, in <module>
    grocy.all_products())
    ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pygrocy/grocy.py", line 110, in all_products
    product_datas = [ProductData(**product) for product in raw_products]
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pygrocy/grocy.py", line 110, in <listcomp>
    product_datas = [ProductData(**product) for product in raw_products]
                     ^^^^^^^^^^^^^^^^^^^^^^
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for ProductData
@fedefreue
Copy link
Contributor

We just merged a fix that'll address this issue. @SebRut can we push an incremental release so the latest version supports 4.0 installations? Guiltlessly, if we do that then we can update the Home Assistant integration to leverage the new fix as well.

@SebRut
Copy link
Owner

SebRut commented Aug 17, 2023

I kicked of new release, but it seems like the Travis CI setup is broken again on their side :/ Hopefully the support is able to resolve this quickly.
Should probably migrate to GitHub actions or something else completely with Travis breaking occasionally.

@SebRut
Copy link
Owner

SebRut commented Aug 17, 2023

Version 2.0.0 should now be available on PyPI.

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

No branches or pull requests

3 participants