-
Notifications
You must be signed in to change notification settings - Fork 215
Description
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Please run down the following list and make sure you've tried the usual "quick fixes":
- Search the issues already opened: https://github.com/googleapis/python-pubsub/issues
- Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python
If you are still having issues, please be sure to include as much information as possible:
Environment details
- OS type and version: 2.0.42-debian10
- Python version:
python --version
: 3.9.1 - pip version:
pip --version
: 22.0.3 google-cloud-pubsub
version:pip show google-cloud-pubsub
: 2.12.1
Code example
# Wrap subscriber in a 'with' block to automatically call close() when done.
with subscriber:
try:
# When `timeout` is not set, result() will block indefinitely,
# unless an exception is encountered first.
streaming_pull_future.result(timeout=timeout)
except TimeoutError:
streaming_pull_future.cancel() # Trigger the shutdown.
streaming_pull_future.result() # Block until the shutdown is complete.
Stack trace
File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 433, in result
return self.__get_result()
File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
google.api_core.exceptions.InvalidArgument: 400 Request contains an invalid argument.
This is a bit weird, my code is basically very similar to the one i copied from the GCP docs, and i cannot reproduce this issue locally, that means locally i have run many times, it is all ok, but once i deployed the code to GCP Dataproc, end of each run i get the above google.api_core.exceptions.InvalidArgument: 400 Request contains an invalid argument.
error, hitting my head on wall, pls help.