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

Error when executing google-play get-latest-build-number --> TypeError: __init__() missing 1 required positional argument: 'includeRestOfWorld' #208

Closed
tadejcek opened this issue Mar 14, 2022 · 2 comments · Fixed by #214
Assignees
Labels
bug Something isn't working

Comments

@tadejcek
Copy link

The other day I run google-play get-latest-build-number --package-name com.company.myapp and received error and version code for Production track wasn't returned. Version code for Alpha and Beta tracks were returned.

It turns out that last version of AAB on Production track has been rolled out only to two countries. When I rolled it out to all countries google-play get-latest-build-number --package-name com.company.myapp started work as expected.

Is there a way to overcome this behavior/ situation when AAB is rolled out to just a few countries and still get version code back?

Output of command google-play get-latest-build-number --package-name com.company.myapp when AAB was rolled out to only few countryes

Get information about the track "internal" for the package "com.company.myapp"
Failed to get version code from Google Play from internal track. No releases with uploaded App bundles or APKs
Get information about the track "alpha" for the package "com.company.myapp"
Latest version code for alpha track: 300012760
Get information about the track "beta" for the package "com.company.myapp"
Latest version code for beta track: 300012804
Get information about the track "production" for the package "com.company.myapp"
Executing GooglePlay action get-latest-build-number failed unexpectedly. Detailed logs are available at "/tmp/codemagic-14-03-22.log". To see more details about the error, add `--verbose` command line option.

the /tmp/codemagic-14-03-22.log

Traceback (most recent call last):
  File "/home/docker/.local/lib/python3.8/site-packages/codemagic/cli/cli_app.py", line 200, in invoke_cli
    CliApp._running_app._invoke_action(args)
  File "/home/docker/.local/lib/python3.8/site-packages/codemagic/cli/cli_app.py", line 156, in _invoke_action
    return cli_action(**action_args)
  File "/home/docker/.local/lib/python3.8/site-packages/codemagic/cli/cli_app.py", line 412, in wrapper
    return func(*args, **kwargs)
  File "/home/docker/.local/lib/python3.8/site-packages/codemagic/tools/google_play.py", line 143, in get_latest_build_number
    track = self.api_client.get_track_information(edit.id, track_name)
  File "/home/docker/.local/lib/python3.8/site-packages/codemagic/google_play/api_client.py", line 92, in get_track_information
    resource = Track(**track_response)
  File "<string>", line 5, in __init__
  File "/home/docker/.local/lib/python3.8/site-packages/codemagic/google_play/resources/track.py", line 74, in __post_init__
    self.releases = [Release(**release) for release in self.releases]
  File "/home/docker/.local/lib/python3.8/site-packages/codemagic/google_play/resources/track.py", line 74, in <listcomp>
    self.releases = [Release(**release) for release in self.releases]
  File "<string>", line 10, in __init__
  File "/home/docker/.local/lib/python3.8/site-packages/codemagic/google_play/resources/track.py", line 59, in __post_init__
    self.countryTargeting = CountryTargeting(**self.countryTargeting)
TypeError: __init__() missing 1 required positional argument: 'includeRestOfWorld'```
@priitlatt
Copy link
Contributor

Thanks for the report. We'll look into it.

@priitlatt
Copy link
Contributor

This is now fixed in version 0.23.1. Thank you @tadejcek for reporting it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants