You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The uploadDate field does not seem to be required, or at least it is not reliably transferred back with the rest of the app data. If the information is missing it triggers an error (KeyError: 'uploadDate') while assembling the search results. This causes the search to fail despite already having received the results.
Here is an example of a failing search:
$ gplaycli -s "Signal"
Traceback (most recent call last):
File "/usr/bin/gplaycli", line 11, in <module>
load_entry_point('gplaycli==3.29', 'console_scripts', 'gplaycli')()
File "/usr/lib/python3/dist-packages/gplaycli/gplaycli.py", line 658, in main
cli.search(args.search, not args.paid)
File "/usr/lib/python3/dist-packages/gplaycli/hooks.py", line 11, in check_connection
return function(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/gplaycli/gplaycli.py", line 374, in search
details['uploadDate'],
KeyError: 'uploadDate'
This is fixed with a ternary check. I have patched it locally, and can once again successfully search.
This patch that shows the simple chage:
--- gplaycli.py.orig 2020-07-15 13:46:29.392977997 -0400+++ gplaycli.py 2020-07-15 13:53:51.545281696 -0400@@ -371,7 +371,7 @@ class GPlaycli:
util.sizeof_fmt(int(details['installationSize']))
if int(details['installationSize']) > 0 else 'N/A',
details['numDownloads'],
- details['uploadDate'],+ details['uploadDate'] if ('uploadDate' in details) else 'N/A',
app['docid'],
details['versionCode'],
"%.2f" % app["aggregateRating"]["starRating"]
I can come back and make a real pull request when I have some time (after the project that required me to figure this out is finished). I wanted to make sure this was documented for others, and give someone the opportunity to patch their own instance, or put together a real commit, before I have time to get to it.
The text was updated successfully, but these errors were encountered:
gplaycli
: Python 3.8.4gplaycli -v
: 3.29 [Python3.8.4]gplaycli
: aptThe
uploadDate
field does not seem to be required, or at least it is not reliably transferred back with the rest of the app data. If the information is missing it triggers an error (KeyError: 'uploadDate'
) while assembling the search results. This causes the search to fail despite already having received the results.Here is an example of a failing search:
This is fixed with a ternary check. I have patched it locally, and can once again successfully search.
This patch that shows the simple chage:
I can come back and make a real pull request when I have some time (after the project that required me to figure this out is finished). I wanted to make sure this was documented for others, and give someone the opportunity to patch their own instance, or put together a real commit, before I have time to get to it.
The text was updated successfully, but these errors were encountered: