Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Static external IP sample entry point passes invalid keyword arguments

Open Beginner friendly
#14,611 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
gcp, python
Domain
cloud

Research direction

Start with compute/client_library/recipes/instances/ip_address/assign_static_external_ip_to_new_vm.py and its generated counterpart at compute/client_library/snippets/instances/ip_address/assign_static_external_ip_to_new_vm.py. Inspect the command-line entry point and run the reported mypy check or sample to confirm the call uses the function's accepted argument; done means the generated sample no longer reports the keyword errors and can run past argument validation.

Written by the indexing model from the issue text.

Description

samples

In which file did you encounter the issue?

  • compute/client_library/recipes/instances/ip_address/assign_static_external_ip_to_new_vm.py
  • compute/client_library/snippets/instances/ip_address/assign_static_external_ip_to_new_vm.py

Did you change the file? If so, how?

No.

Describe the issue

The command-line entry point calls assign_static_external_ip_to_new_vm with external_ipv4 and external_access keyword arguments, but the function accepts a single ip_address argument. The generated snippet and its source recipe contain the same incorrect call.

Static reproduction:

compute\\client_library\\snippets\\instances\\ip_address\\assign_static_external_ip_to_new_vm.py:313: error: Unexpected keyword argument "external_ipv4" for "assign_static_external_ip_to_new_vm"  [call-arg]
compute\\client_library\\snippets\\instances\\ip_address\\assign_static_external_ip_to_new_vm.py:313: error: Unexpected keyword argument "external_access" for "assign_static_external_ip_to_new_vm"  [call-arg]

At runtime, the call raises TypeError: assign_static_external_ip_to_new_vm() got an unexpected keyword argument 'external_ipv4' before the instance is created.

Expected behavior: the sample entry point passes the pre-created address as ip_address. Actual behavior: the generated sample cannot run.

Environment: Python 3.12, mypy 1.14.1, repository main at commit 430a87ada6f2d33f318b5d16b77464679905a140.

Dominant language
Jupyter Notebook
Stars
8.1k
Forks
6.7k
Avg merge
4d 4h
Merged PRs (30d)
8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GoogleCloudPlatform/python-docs-samples

All issues in GoogleCloudPlatform/python-docs-samples

Similar issues

More Cloud issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.