Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

PolicyTagManagerClient methods: 501 Operation is not implemented, or supported, or enabled #33

Closed

Description

@ricardolsmendes

I'm writing a script to use the PolicyTagManagerClient, but all methods fail with a google.api_core.exceptions.MethodNotImplemented: 501 Operation is not implemented, or supported, or enabled. message.

Environment details

  • OS type and version: Windows 10
  • Python version: 3.7.2
  • pip version: 20.1.1
  • google-cloud-datacatalog version: 0.8.0

Steps to reproduce

  1. Run a script calling any of the PolicyTagManagerClient methods.

Code example

https://github.com/googleapis/python-datacatalog/pull/37/files

OR simply:

def create_taxonomy(project_id):
    """Create a Taxonomy."""

    location = datacatalog_v1beta1.PolicyTagManagerClient.location_path(project_id, 'us')

    taxonomy = types.Taxonomy()
    taxonomy.display_name = "My Taxonomy"
    taxonomy.description = "This Taxonomy represents ..."

    datacatalog_v1beta1.PolicyTagManagerClient().create_taxonomy(
        parent=location, taxonomy=taxonomy)

Stack trace

grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNIMPLEMENTED
        details = "Operation is not implemented, or supported, or enabled."
        debug_error_string = "{"created":"@1590760876.084000000","description":"Error received from peer ipv4:216.58.192.42:443","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":"Operation is not implemented, or supported, or enabled.","grpc_status":12}"
>

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

Traceback (most recent call last):
  File "policy_tags_manager.py", line 118, in <module>
    PolicyTagsManagerCLI.run(sys.argv[1:] if len(sys.argv) > 0 else sys.argv)
  File "policy_tags_manager.py", line 81, in run
    args.func(args)
  File "policy_tags_manager.py", line 110, in __create_taxonomy
    description=args.description)
  File "policy_tags_manager.py", line 34, in create_taxonomy
    return self.__datacatalog_facade.create_taxonomy(project_id, display_name, description)
  File "policy_tags_manager.py", line 63, in create_taxonomy
    parent=location, taxonomy=taxonomy)
  File "<REDACTED-PATH>\gcp-datacatalog-python\env\lib\site-packages\google\cloud\datacatalog_v1beta1\gapic\policy_tag_manager_client.py", line 305, in create_taxonomy
    request, retry=retry, timeout=timeout, metadata=metadata
  File "<REDACTED-PATH>\gcp-datacatalog-python\env\lib\site-packages\google\api_core\gapic_v1\method.py", line 143, in __call__
    return wrapped_func(*args, **kwargs)
  File "<REDACTED-PATH>\gcp-datacatalog-python\env\lib\site-packages\google\api_core\retry.py", line 286, in retry_wrapped_func
    on_error=on_error,
  File "<REDACTED-PATH>\gcp-datacatalog-python\env\lib\site-packages\google\api_core\retry.py", line 184, in retry_target
    return target()
  File "<REDACTED-PATH>\gcp-datacatalog-python\env\lib\site-packages\google\api_core\timeout.py", line 214, in func_with_timeout
    return func(*args, **kwargs)
  File "<REDACTED-PATH>\gcp-datacatalog-python\env\lib\site-packages\google\api_core\grpc_helpers.py", line 59, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "<string>", line 3, in raise_from
google.api_core.exceptions.MethodNotImplemented: 501 Operation is not implemented, or supported, or enabled.

Activity

  1. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    and removed
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Jun 9, 2020
  2. added
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    and removed
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Jun 10, 2020
  3. ekohlwey-fb commented on Jun 17, 2020

    @ekohlwey-fb

    I'm having this issue as well. Does the Google team have an official view on whether or not this is a bug or misuse of the API?

  4. meredithslota commented on Jun 18, 2020

    @meredithslota
    Contributor

    Hi there — we are actively investigating this but do not yet have an answer. Google folks, this is being tracked at internal bug b/159220336.

  5. 6 remaining items

  6. added
    🚨This issue needs some love.
    and removed
    🚨This issue needs some love.
    on Jun 23, 2020
  7. tmshn commented on Sep 24, 2020

    @tmshn
    Contributor

    I have a same issue for list_tags (using v2.0.0).
    Note that this happens quite often, but not always. The API call succeeds around 3%.

    Here's the stacktrace:

    Traceback (most recent call last):
      File "<REDACTED>/.venv/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 57, in error_remapped_callable
        return callable_(*args, **kwargs)
      File "<REDACTED>/.venv/lib/python3.8/site-packages/grpc/_channel.py", line 826, in __call__
        return _end_unary_response_blocking(state, call, False, None)
      File "<REDACTED>/.venv/lib/python3.8/site-packages/grpc/_channel.py", line 729, in _end_unary_response_blocking
        raise _InactiveRpcError(state)
    grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
            status = StatusCode.UNIMPLEMENTED
            details = "Operation is not implemented, or supported, or enabled."
            debug_error_string = "{"created":"@1600948541.258238000","description":"Error received from peer ipv6:[2404:6800:4004:80a::200a]:443","file":"src/core/lib/surface/call.cc","file_line":1062,"grpc_message":"Operation is not implemented, or supported, or enabled.","grpc_status":12}"
    >
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "<REDACTED>/.venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
        return self.main(*args, **kwargs)
      File "<REDACTED>/.venv/lib/python3.8/site-packages/click/core.py", line 782, in main
        rv = self.invoke(ctx)
      File "<REDACTED>/.venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "<REDACTED>/.venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "<REDACTED>/.venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
        return callback(*args, **kwargs)
      File "<REDACTED>/myapp/main.py", line 48, in export_metadata
        for table_metadata in fetcher.fetch_tables_metadata(project_id, dataset_id):
      File "<REDACTED>/myapp/gcp/fetch.py", line 55, in fetch_tables_metadata
        for tag in self.datacatalog.list_tags(request={"parent": path}):
      File "<REDACTED>/.venv/lib/python3.8/site-packages/google/cloud/datacatalog_v1beta1/services/data_catalog/client.py", line 2508, in list_tags
        response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
      File "<REDACTED>/.venv/lib/python3.8/site-packages/google/api_core/gapic_v1/method.py", line 145, in __call__
        return wrapped_func(*args, **kwargs)
      File "<REDACTED>/.venv/lib/python3.8/site-packages/google/api_core/retry.py", line 281, in retry_wrapped_func
        return retry_target(
      File "<REDACTED>/.venv/lib/python3.8/site-packages/google/api_core/retry.py", line 184, in retry_target
        return target()
      File "<REDACTED>/.venv/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
        six.raise_from(exceptions.from_grpc_error(exc), exc)
      File "<string>", line 3, in raise_from
    google.api_core.exceptions.MethodNotImplemented: 501 Operation is not implemented, or supported, or enabled.
    
  8. yongyct commented on Sep 25, 2020

    @yongyct

    Getting this issue for create_entry_group.
    Earlier docker images for my application a few days/past couple of weeks earlier that were working are now broken too. Very frustrating to have to deal with sudden production issues... would be good to have resolution soon...

    Traceback (most recent call last):
      File "/usr/local/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 57, in error_remapped_callable
        return callable_(*args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/grpc/_channel.py", line 826, in __call__
        return _end_unary_response_blocking(state, call, False, None)
      File "/usr/local/lib/python3.7/site-packages/grpc/_channel.py", line 729, in _end_unary_response_blocking
        raise _InactiveRpcError(state)
    grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    	status = StatusCode.UNIMPLEMENTED
    	details = "Operation is not implemented, or supported, or enabled."
    	debug_error_string = "{"created":"@1601032810.362696516","description":"Error received from peer ipv4:199.36.153.9:443","file":"src/core/lib/surface/call.cc","file_line":1061,"grpc_message":"Operation is not implemented, or supported, or enabled.","grpc_status":12}"
    >
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "[REDACTED].py", line 139, in <module>
        create_fileset_method()
      File "[REDACTED].py", line 88, in create_fileset_method
        entry_group=entry_group_obj)
      File "/usr/local/lib/python3.7/site-packages/google/cloud/datacatalog_v1/gapic/data_catalog_client.py", line 503, in create_entry_group
        request, retry=retry, timeout=timeout, metadata=metadata
      File "/usr/local/lib/python3.7/site-packages/google/api_core/gapic_v1/method.py", line 145, in __call__
        return wrapped_func(*args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/google/api_core/retry.py", line 286, in retry_wrapped_func
        on_error=on_error,
      File "/usr/local/lib/python3.7/site-packages/google/api_core/retry.py", line 184, in retry_target
        return target()
      File "/usr/local/lib/python3.7/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout
        return func(*args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
        six.raise_from(exceptions.from_grpc_error(exc), exc)
      File "<string>", line 3, in raise_from
    google.api_core.exceptions.MethodNotImplemented: 501 Operation is not implemented, or supported, or enabled.
    
  9. tameemiftikhar commented on Sep 25, 2020

    @tameemiftikhar

    Seeing same issue for list_tags with images that were built a week ago.

    grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    	status = StatusCode.UNIMPLEMENTED
    	details = "Operation is not implemented, or supported, or enabled."
    	debug_error_string = "{"created":"@1601040451.272763000","description":"Error received from peer ipv6:[2607:f8b0:400b:808::200a]:443","file":"src/core/lib/surface/call.cc","file_line":1062,"grpc_message":"Operation is not implemented, or supported, or enabled.","grpc_status":12}"
    >
    
  10. joaopamaral commented on Sep 25, 2020

    @joaopamaral

    I'm having this same issue for list_tags (google-cloud-datacatalog==1.0.0)! Yesterday was working with no problem and today I've noticed that after they change the Data Catalog UI, my code broke!

    Error
    Traceback (most recent call last):
      File "\lib\site-packages\google\api_core\grpc_helpers.py", line 57, in error_remapped_callable
        return callable_(*args, **kwargs)
      File "\lib\site-packages\grpc\_channel.py", line 826, in __call__
        return _end_unary_response_blocking(state, call, False, None)
      File "\lib\site-packages\grpc\_channel.py", line 729, in _end_unary_response_blocking
        raise _InactiveRpcError(state)
    grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    	status = StatusCode.UNIMPLEMENTED
    	details = "Operation is not implemented, or supported, or enabled."
    	debug_error_string = "{"created":"@1601048577.314000000","description":"Error received from peer ipv6:[####]:443","file":"src/core/lib/surface/call.cc","file_line":1062,"grpc_message":"Operation is not implemented, or supported, or enabled.","grpc_status":12}"
    >
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      ...
        map_tags = {t.template_display_name: t for t in data_catalog_client.list_tags(entry.name)}
      File "\lib\site-packages\google\api_core\page_iterator.py", line 212, in _items_iter
        for page in self._page_iter(increment=False):
      File "\lib\site-packages\google\api_core\page_iterator.py", line 243, in _page_iter
        page = self._next_page()
      File "\lib\site-packages\google\api_core\page_iterator.py", line 534, in _next_page
        response = self._method(self._request)
      File "\lib\site-packages\google\api_core\gapic_v1\method.py", line 145, in __call__
        return wrapped_func(*args, **kwargs)
      File "\lib\site-packages\google\api_core\retry.py", line 286, in retry_wrapped_func
        on_error=on_error,
      File "\lib\site-packages\google\api_core\retry.py", line 184, in retry_target
        return target()
      File "\lib\site-packages\google\api_core\timeout.py", line 214, in func_with_timeout
        return func(*args, **kwargs)
      File "\lib\site-packages\google\api_core\grpc_helpers.py", line 59, in error_remapped_callable
        six.raise_from(exceptions.from_grpc_error(exc), exc)
      File "<string>", line 3, in raise_from
    google.api_core.exceptions.MethodNotImplemented: 501 Operation is not implemented, or supported, or enabled.
    
  11. tmshn commented on Sep 28, 2020

    @tmshn
    Contributor

    I don't see this problem happen today, so maybe this is the problem on the API side, not the library side?

  12. tameemiftikhar commented on Sep 28, 2020

    @tameemiftikhar

    The problem has gone away for me as well. So I'm assuming it was on the API side.

  13. joaopamaral commented on Sep 29, 2020

    @joaopamaral

    Same here. The library is working again!

  14. ricardolsmendes commented on Sep 29, 2020

    @ricardolsmendes
    ContributorAuthor

    Thanks for the updates, folks

    Important to let it clear the bug that caused list_tags to fail was probably caused by an internal service disruption that might already be resolved, but it is not the same error originally reported here, despite the similar error messages.

  15. meredithslota commented on Dec 11, 2020

    @meredithslota
    Contributor

    The internal issue b/159220336 for the problem with the API was fixed, and the other issue was an internal service disruption. Closing this issue but please reopen a new issue if the problem re-occurs because it might be indicative of a new/different problem. Thanks!

  16. voitovych-com commented on Nov 2, 2022

    @voitovych-com

    I had a similar problem.
    code:

    from google.cloud.run_v2 import ListServicesRequest
    from google.oauth2 import service_account
    import google.cloud.run_v2 as run_v2
    
    credentials = service_account.Credentials.from_service_account_file("key.json")
    
    run_client = run_v2.ServicesClient(credentials=credentials)
    
    request = ListServicesRequest(
        parent="projectId"
    )
    
    run_client.list_services(request=request)
    

    error:

    grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
            status = StatusCode.UNIMPLEMENTED
            details = "Operation is not implemented, or supported, or enabled."
            debug_error_string = "UNKNOWN:Error received from peer ipv4:216.58.215.106:443 {created_time:"2022-11-02T19:19:04.5426831+00:00", grpc_status:12, grpc_message:"Operation is not implemented, or supported, or enabled."}"
    >
    
  17. meredithslota commented on Nov 3, 2022

    @meredithslota
    Contributor

    @rvoitovich Your issue seems to be in a different client library — https://cloud.google.com/python/docs/reference/run/latest/google.cloud.run_v2.types.ListServicesRequest seems to be the correct reference here. The relevant GitHub repo to report this issue on is here: https://github.com/googleapis/python-run Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: datacatalogIssues related to the googleapis/python-datacatalog API.externalThis issue is blocked on a bug with the actual product.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions