Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

googleplay.py:645: RuntimeWarning: Unexpected end-group tag: Not all data was converted #272

Closed
5 tasks done
acim opened this issue Sep 17, 2020 · 5 comments · Fixed by #273
Closed
5 tasks done

Comments

@acim
Copy link

acim commented Sep 17, 2020

  • Operating System Linux Mint 20 Ulyana
  • Python version 3.8.2
  • GPlayCli version 3.29
  • The way you installed gplaycli: pip install gplaycli
  • The authentication method: (own) credentials

Applications get downloaded but I get the following error:

/home/xxx/.local/lib/python3.8/site-packages/gpapi/googleplay.py:645: RuntimeWarning: Unexpected end-group tag: Not all data was converted
  response = googleplay_pb2.ResponseWrapper.FromString(response.content)
@acim acim changed the title RuntimeWarning: Unexpected end-group tag: Not all data was converted googleplay.py:645: RuntimeWarning: Unexpected end-group tag: Not all data was converted Sep 17, 2020
@guoqiao
Copy link
Contributor

guoqiao commented Sep 20, 2020

My error:

[ERROR] Error while downloading com.pushbullet.android : Unexpected end-group tag.
[ERROR] A few packages could not be downloaded :
com.pushbullet.android
Unexpected end-group tag.

@Yuubari
Copy link

Yuubari commented Sep 22, 2020

This seems like the same problem as in NoMore201/googleplay-api#132. I tried the suggested fix and it seems to be working for me.

@guoqiao
Copy link
Contributor

guoqiao commented Sep 27, 2020

verbose log:

gplaycli --verbose --progress -d $APK
[INFO] GPlayCli version 3.29 [Python3.8.2] 
[INFO] Configuration file is /home/guoqiao/git/gplaycli/gplaycli.conf
[INFO] Device is bacon
[INFO] Using credentials to connect to API
[INFO] Using plaintext password
[INFO] 1 / 1 com.pushbullet.android
/usr/local/lib/python3.8/dist-packages/gpapi/googleplay.py:634: RuntimeWarning: Unexpected end-group tag: Not all data was converted
  response = googleplay_pb2.ResponseWrapper.FromString(response.content)
Traceback (most recent call last):
  File "/usr/local/bin/gplaycli", line 11, in <module>
    load_entry_point('gplaycli', 'console_scripts', 'gplaycli')()
  File "/home/guoqiao/git/gplaycli/gplaycli/gplaycli.py", line 659, in main
    cli.download(args.download)
  File "/home/guoqiao/git/gplaycli/gplaycli/hooks.py", line 11, in check_connection
    return function(self, *args, **kwargs)
  File "/home/guoqiao/git/gplaycli/gplaycli/gplaycli.py", line 290, in download
    splits = data_iter['splits']
KeyError: 'splits'

guoqiao pushed a commit to guoqiao/gplaycli that referenced this issue Sep 27, 2020
Currently downloading will fail with following error:

```
gplaycli --verbose --progress -d com.pushbullet.android
[INFO] GPlayCli version 3.29 [Python3.8.2]
[INFO] Configuration file is /home/guoqiao/git/gplaycli/gplaycli.conf
[INFO] Device is bacon
[INFO] Using credentials to connect to API
[INFO] Using plaintext password
[INFO] 1 / 1 com.pushbullet.android
/usr/local/lib/python3.8/dist-packages/gpapi/googleplay.py:634: RuntimeWarning: Unexpected end-group tag: Not all data was converted
  response = googleplay_pb2.ResponseWrapper.FromString(response.content)
Traceback (most recent call last):
  File "/usr/local/bin/gplaycli", line 11, in <module>
    load_entry_point('gplaycli', 'console_scripts', 'gplaycli')()
  File "/home/guoqiao/git/gplaycli/gplaycli/gplaycli.py", line 659, in main
    cli.download(args.download)
  File "/home/guoqiao/git/gplaycli/gplaycli/hooks.py", line 11, in check_connection
    return function(self, *args, **kwargs)
  File "/home/guoqiao/git/gplaycli/gplaycli/gplaycli.py", line 290, in download
    splits = data_iter['splits']
KeyError: 'splits'
```

Use `get` to avoid dict `KeyError` while `splits` not exists in `data_iter`.

Fixes: matlink#272

Signed-off-by: Qiao Guo <guoqiao@gmail.com>
@guoqiao
Copy link
Contributor

guoqiao commented Sep 27, 2020

Created a PR to fix this. Review and Merge appreciated !

@shtrom
Copy link
Contributor

shtrom commented Jul 17, 2021

Still getting the error with @guoqiao's fix

[21:42:48] @supahwinch ~/src/gplaycli$ git describe                                                    130 ↵  [gplaycli] (remotes/gh-guoqiao/Issue-272-splits-keyerror)
fatal: No annotated tags can describe '711d64fad285272543c619fd1152efa3d39a2626'.
However, there were unannotated tags: try --tags.
[21:42:50] @supahwinch ~/src/gplaycli$ gplaycli --verbose --progress -d  au.gov.tas.checkin         0s 128 ↵  [gplaycli] (remotes/gh-guoqiao/Issue-272-splits-keyerror)
[INFO] GPlayCli version 3.29 [Python3.9.2] 
[INFO] Configuration file is /home/shtrom/src/gplaycli/gplaycli.conf
[INFO] Device is bacon
[INFO] Using cached token.
[INFO] Using auto retrieved token to connect to API
[INFO] 1 / 1 au.gov.tas.checkin
/home/shtrom/src/gplaycli/.venv/gplaycli/lib/python3.9/site-packages/gpapi/googleplay.py:645: RuntimeWarning: Unexpected end-group tag: Not all data was converted
  response = googleplay_pb2.ResponseWrapper.FromString(response.content)
[ERROR] Error while downloading au.gov.tas.checkin : 'Error while retrieving information from server. [DF-DFERH-01]'
[ERROR] A few packages could not be downloaded :
au.gov.tas.checkin
'Error while retrieving information from server. [DF-DFERH-01]'

matlink pushed a commit that referenced this issue Oct 2, 2021
Currently downloading will fail with following error:

```
gplaycli --verbose --progress -d com.pushbullet.android
[INFO] GPlayCli version 3.29 [Python3.8.2]
[INFO] Configuration file is /home/guoqiao/git/gplaycli/gplaycli.conf
[INFO] Device is bacon
[INFO] Using credentials to connect to API
[INFO] Using plaintext password
[INFO] 1 / 1 com.pushbullet.android
/usr/local/lib/python3.8/dist-packages/gpapi/googleplay.py:634: RuntimeWarning: Unexpected end-group tag: Not all data was converted
  response = googleplay_pb2.ResponseWrapper.FromString(response.content)
Traceback (most recent call last):
  File "/usr/local/bin/gplaycli", line 11, in <module>
    load_entry_point('gplaycli', 'console_scripts', 'gplaycli')()
  File "/home/guoqiao/git/gplaycli/gplaycli/gplaycli.py", line 659, in main
    cli.download(args.download)
  File "/home/guoqiao/git/gplaycli/gplaycli/hooks.py", line 11, in check_connection
    return function(self, *args, **kwargs)
  File "/home/guoqiao/git/gplaycli/gplaycli/gplaycli.py", line 290, in download
    splits = data_iter['splits']
KeyError: 'splits'
```

Use `get` to avoid dict `KeyError` while `splits` not exists in `data_iter`.

Fixes: #272

Signed-off-by: Qiao Guo <guoqiao@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants