GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Opaque exception for mismatched Datastore projects · Issue #1693 · googleapis/google-cloud-python

Opaque exception for mismatched Datastore projects #1693

New issue
Copy link
New issue
Copy link
Closed
Closed
Opaque exception for mismatched Datastore projects#1693
Copy link
Assignees
dhermes
Labels
api: datastoreIssues related to the Datastore API.

Description

@bendemaree
bendemaree
opened on Apr 4, 2016
Issue body actions

Not a big issue by any means, but in 0.12.0 (w.r.t. v1beta3) requesting a project/dataset that is not correct throws a different exception, and one that is harder to read, than prior versions; the relevant error is in the stack trace, though.

Specifically, this is running against gcd.sh (shipped as gcd-emulator v1beta3-1.0.0 with gcloud) with the flag --project foo.

[snip]
    entities = self.client.get_multi(keys)
../../.virtualenvs/project/lib/python2.7/site-packages/gcloud/datastore/client.py:291: in get_multi
    transaction_id=transaction and transaction.id,
../../.virtualenvs/project/lib/python2.7/site-packages/gcloud/datastore/client.py:123: in _extended_lookup
    transaction_id=transaction_id,
../../.virtualenvs/project/lib/python2.7/site-packages/gcloud/datastore/connection.py:199: in lookup
    _datastore_pb2.LookupResponse)
../../.virtualenvs/project/lib/python2.7/site-packages/gcloud/datastore/connection.py:117: in _rpc
    data=request_pb.SerializeToString())
../../.virtualenvs/project/lib/python2.7/site-packages/gcloud/datastore/connection.py:93: in _request
    error_status = status_pb2.Status.FromString(content)
../../.virtualenvs/project/lib/python2.7/site-packages/google/protobuf/internal/python_message.py:770: in FromString
    message.MergeFromString(s)
../../.virtualenvs/project/lib/python2.7/site-packages/google/protobuf/internal/python_message.py:1091: in MergeFromString
    if self._InternalParse(serialized, 0, length) != length:
../../.virtualenvs/project/lib/python2.7/site-packages/google/protobuf/internal/python_message.py:1117: in InternalParse
    new_pos = local_SkipField(buffer, new_pos, end, tag_bytes)
../../.virtualenvs/project/lib/python2.7/site-packages/google/protobuf/internal/decoder.py:850: in SkipField
    return WIRETYPE_TO_SKIPPER[wire_type](buffer, pos, end)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

buffer = 'Hosted project, foo, does not match requested project, bar.', pos = 10
end = 77

    def _RaiseInvalidWireType(buffer, pos, end):
      """Skip function for unknown wire types.  Raises an exception."""

>     raise _DecodeError('Tag had invalid wire type.')
E     DecodeError: Tag had invalid wire type.

The test case for this (prior to 0.12.0) looks for gcloud.exceptions.BadRequest to be raised.

Can reproduce with something like:

from gcloud.datastore import Client, Key
c = Client(project="bar")
c.get(Key("Kind", "some-uuid", project="bar"))

Activity

  1. dhermes
    added
    api: datastoreIssues related to the Datastore API.
    on Apr 4, 2016
  2. dhermes commented on Apr 4, 2016

    @dhermes
    dhermes
    on Apr 4, 2016
    Contributor
    More actions

    /cc @pcostell

  3. dhermes commented on Apr 4, 2016

    @dhermes
    dhermes
    on Apr 4, 2016
    Contributor
    More actions

    @bendemaree I confirmed the DecodeError. Thanks.

  4. pcostell commented on Apr 4, 2016

    @pcostell
    pcostell
    on Apr 4, 2016
    Contributor
    More actions

    Thanks for the report. This looks like a bug with the gcd tool, I'll look into getting this fixed.

  5. dhermes commented on Apr 4, 2016

    @dhermes
    dhermes
    on Apr 4, 2016
    Contributor
    More actions

    Thanks @pcostell. Should I close out this issue and link to another issue tracker?

  6. pcostell commented on Apr 4, 2016

    @pcostell
    pcostell
    on Apr 4, 2016
    Contributor
    More actions

    Sure, could you move it over to GoogleCloudPlatform/google-cloud-datastore?

  7. dhermes commented on Apr 4, 2016

    @dhermes
    dhermes
    on Apr 4, 2016
    Contributor
    More actions

    googleapis/google-cloud-datastore#98

  8. dhermes
    closed this as completedon Apr 4, 2016
  9. pcostell commented on Apr 4, 2016

    @pcostell
    pcostell
    on Apr 4, 2016
    Contributor
    More actions

    Thanks @dhermes.

  10. bendemaree commented on Apr 4, 2016

    @bendemaree
    bendemaree
    on Apr 4, 2016
    Author
    More actions

    Thanks @dhermes, @pcostell!

  11. JustinBeckwith
    assigned
    dhermes
    on Feb 1, 2021
  12. parthea
    added 2 commits that reference this issue on Mar 2, 2026

    fix: remove setup.cfg configuration for creating universal wheels (#1693

    c44f0b8

    chore: librarian release pull request: 20260105T122553Z (#1913)

    4a6f2f6
  13. parthea
    added a commit that references this issue on Apr 1, 2026

    feat: publish bigframes blob(Multimodal) to preview (#1693)

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

Metadata

Metadata

Assignees

  • @dhermes
    dhermes

Labels

api: datastoreIssues related to the Datastore API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.