google-cloud-python icon indicating copy to clipboard operation
google-cloud-python copied to clipboard

WebRisk submit_uri throws MethodNotImplemented

Open itsnotapt opened this issue 1 year ago • 2 comments

Determine this is the right repository

  • [X] I determined this is the correct repository in which to report this bug.

Summary of the issue

Context Using the sample code for submit_uri at: https://github.com/googleapis/google-cloud-python/blob/main/packages/google-cloud-webrisk/samples/generated_samples/webrisk_v1_generated_web_risk_service_submit_uri_sync.py

Expected Behavior: Return a OK response code.

Actual Behavior: Returns a MethodNotImplemented: 501 Method not found.

API client name and version

google-cloud-webrisk 1.14.5

Reproduction steps: code

from google.cloud import webrisk_v1
client = webrisk_v1.WebRiskServiceClient(credentials=credentials)

# Initialize request argument(s)
submission = webrisk_v1.Submission()
submission.uri = "<uri>"

request = webrisk_v1.SubmitUriRequest(
    parent=f"projects/{project_number}",
    submission=submission,
)

# Make the request
operation = client.submit_uri(request=request)

print("Waiting for operation to complete...")

response = operation.result()

# Handle the response
print(response)

Reproduction steps: supporting files

None

Reproduction steps: actual results

MethodNotImplemented: 501 Method not found.
status = StatusCode.UNIMPLEMENTED
	details = "Method not found."
	debug_error_string = "UNKNOWN:Error received from peer ipv4:142.251.215.234:443 {created_time:"2024-08-30T10:05:29.539129-07:00", grpc_status:12, grpc_message:"Method not found."}

Reproduction steps: expected results

OK returned

OS & version + platform

MacOS 14.6

Python environment

3.12.4

Python dependencies

Package                  Version
------------------------ ---------
cachetools               5.5.0
certifi                  2024.8.30
charset-normalizer       3.3.2
google-api-core          2.19.2
google-auth              2.34.0
google-cloud-webrisk     1.14.5
googleapis-common-protos 1.65.0
grpcio                   1.66.1
grpcio-status            1.66.1
idna                     3.8
pip                      24.2
proto-plus               1.24.0
protobuf                 5.28.0
pyasn1                   0.6.0
pyasn1_modules           0.4.0
requests                 2.32.3
rsa                      4.9
urllib3                  2.2.2

itsnotapt avatar Aug 30 '24 17:08 itsnotapt

Looks like this endpoint is still in Early Access?

Only allowlisted projects can use this method during Early Access. Please reach out to Sales or your customer engineer to obtain access.

itsnotapt avatar Aug 30 '24 17:08 itsnotapt

Thanks for your report! Is this error still happening? Is the endpoint still in Early Access?

vchudnov-g avatar Apr 04 '25 17:04 vchudnov-g