Skip to content

A few days ago, there was no problem calling the API, but today there has been no successful access and an access exception has occurred #314

Open
@Jianhong-user

Description

@Jianhong-user

Description of the bug:

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "D: \ Python environment \ Project \ Gemini API \ pythonProject . venv \ Lib \ site packages \ Google \ api_core \ retry \ retry_unary. py", line 144, in retry_target

Result=target()

^^^^^^^^

File "D: \ Python_environment \ Project \ Gemini-Api \ pythonProject . venv \ Lib \ site packages \ Google \ api_core \ time out. py", line 120, in func_with_time out

Return fun (* args, * * kwargs)

^^^^^^^^^^^^^^^^^^^^^

File "D: \ Python environment \ Project \ Gemini API \ pythonProject . venv \ Lib \ site packages \ Google \ api_core \ grpc_helpers. py", line 78, in error remopped_callable

Raise exceptions. from grpc_error (exc) from exc

Google. api_core. exceptions ServiceUnavailable: 503 failed to connect to all addresses; Last error: UNKNOWN: ipv4:142.251.42.234:443: TCP handshake shutdown

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "D: \ Python environment \ Project \ Gemini-Api \ pythonProject \ Refactoring \ 1. py", line 18, in

"I plan to go to Japan and have always wanted to see cherry blossoms there."

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "D: \ Python environment \ Project \ Gemini-Api \ pythonProject . venv \ Lib \ site packages \ Google \ generateai \ generative_models. py", line 426, in send_message

Response=self. model. generate.content(

^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "D: \ Python environment \ Project \ Gemini-Api \ pythonProject . venv \ Lib \ site packages \ Google \ generateai \ generative_models. py", line 232, in generate.content

Response=self_ Client.generate_content(

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "D: \ Python environment \ Project \ Gemini API \ pythonProject . venv \ Lib \ site packages \ Google \ ai \ generativelanguage_v1beta \ services \ generative_service \ client. py", line 566, in generate.content

Response=rpc(

^^^^

File "D: \ Python environment \ Project \ Gemini-Api \ pythonProject . venv \ Lib \ site packages \ Google \ api_core \ gapic_v1 \ method. py", line 131, in __ call__

Return wrapped_fun (* args, * * kwargs)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "D: \ Python environment \ Project \ Gemini API \ pythonProject . venv \ Lib \ site packages \ Google \ api_core \ retry \ retry_unary. py", line 293, in retry_wrapped_fun

Return retry_target(

^^^^^^^^^^^^^

File "D: \ Python environment \ Project \ Gemini API \ pythonProject . venv \ Lib \ site packages \ Google \ api_core \ retry \ retry_unary. py", line 153, in retry_target

_Retryerror helper(

File "D: \ Python environment \ Project \ Gemini API \ pythonProject . venv \ Lib \ site packages \ Google \ api_core \ retry \ retry_base. py", line 221, in _retry_error_helper

Raise final_exc from source_exc

Google. api_core. exceptions RetryError: timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses

Actual vs expected behavior:

No response

Any other information you'd like to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:supportHow to do xyz?status:triagedIssue/PR triaged to the corresponding sub-teamtype:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions