ahivert/tgtg-python

404 error when using get_items()

Closed this issue · 6 comments

I'm getting the following error when using get_items method:

  File "/opt/projects/tgtg-python/tgtg/__init__.py", line 426, in get_active
    raise TgtgAPIError(response.status_code, response.content)
tgtg.exceptions.TgtgAPIError: (404, b'')

I also see this, when getting active items, e.g. get_active(). FYI @beauthi you have get_items() in your title but get_active() in the pasted error. For me, get_items() works fine. I think because it is a non-authenticated or not user-specific basically, perhaps?
Anyway, would appreciate some insight into why this happens and a fix for it. Maybe the TGTG backend changed since last release?

Checking, I do see the app has been updated since, in fact latest update was 3 days ago, 27 Nov 2023. The latest apk version is 23.11.1, as opposed to what is defined in this repo, 22.5.5. So, quite likely that there is breaking changes due to the major update from 22.* -> 23.*. If anyone can already sniff the app traffic to ascertain any backend URI changes, that would be great. Otherwise, I will try to spend some time setting up an Android Virtual Machine in the future, if I get some time (unlikely lol).

@beauthi Success! I just tried bumping the URI for the active orders endpoint from order/v6/active to order/v7/active in my own fork of this repo, and it worked upon testing :)
I'll open a PR here to fix; I'll test some of the other endpoints first in case there are more (most likely).

🤣 Another PR fixing this was literally merged as I wrote my last comment! Oh well...#278

@beauthi you can close this issue now, its resolved by release 0.16.1

Thanks @chris24walsh! Closing this issue.