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 — AttributeError: 'ProtobufEntry' object has no attribute 'text_payload' · Issue #1807 · googleapis/google-cloud-python

AttributeError: 'ProtobufEntry' object has no attribute 'text_payload' #1807

New issue
Copy link
New issue
Copy link
Closed
Closed
AttributeError: 'ProtobufEntry' object has no attribute 'text_payload'#1807
Copy link
Assignees
tseaver
Labels
api: loggingIssues related to the Cloud Logging API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@waprin
waprin
opened on May 18, 2016
Issue body actions

Reproducing this is blocked by #1806, but I wanted to make sure it gets recorded this popped up. Still on client.list_entries:

  File "list_logs.py", line 45, in list_logs
    format((timestamp, entry.text_payload, entry.struct_payload)))
AttributeError: 'ProtobufEntry' object has no attribute 'text_payload'

Activity

  1. dhermes
    added
    api: loggingIssues related to the Cloud Logging API.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on May 18, 2016
  2. waprin commented on May 18, 2016

    @waprin
    waprin
    on May 18, 2016
    ContributorAuthor
    More actions

    Actually if I remove the #1806 validation I reliably reproduce this.

  3. waprin commented on May 18, 2016

    @waprin
    waprin
    on May 18, 2016
    ContributorAuthor
    More actions

    I am now realizing that this is in my own code, however that was copied from the docs so maybe just a docs error.

  4. waprin commented on May 23, 2016

    @waprin
    waprin
    on May 23, 2016
    ContributorAuthor
    More actions

    @dhermes Still need to clean up the docs. Is the idea that now you will just reference payload directly for each LogEntry type? Also, the docs say its logger.delete_entries() when now its logger.delete(). Can make the PR if you'd like.

  5. tseaver commented on May 23, 2016

    @tseaver
    tseaver
    on May 23, 2016
    Contributor
    More actions

    @waprin, can you show the example which is triggering the traceback?

    Is the idea that now you will just reference payload directly for each LogEntry type?

    Yes, each entry type (TextEntry, StructEntry, and ProtobufEntry) will have a payload attribute. For ProtobufEntry objects, you can use the parse_mesage method to get an actual protobuf: by default, it comes across the wire as a mapping.

    Also, the docs say its logger.delete_entries() when now its logger.delete(). Can make the PR if you'd like.

    Thanks, that would be great.

  6. waprin commented on May 23, 2016

    @waprin
    waprin
    on May 23, 2016
    ContributorAuthor
    More actions

    http://googlecloudplatform.github.io/gcloud-python/stable/logging-usage.html .

    from gcloud import logging
    >>> client = logging.Client()
    >>> entries, token = client.list_entries()  # API call
    >>> for entry in entries:
    ...    timestamp = entry.timestamp.isoformat()
    ...    print('%sZ: %s | %s' %
    ...          (timestamp, entry.text_payload, entry.struct_payload))
    

    There are some other changes as well, I am writing the samples for python-docs-samples then I'll swing by and update it all.

  7. dhermes commented on May 25, 2016

    @dhermes
    dhermes
    on May 25, 2016
    Contributor
    More actions

    Thanks!

  8. waprin commented on Jun 3, 2016

    @waprin
    waprin
    on Jun 3, 2016
    ContributorAuthor
    More actions

    Still planning on fixing these docs, just waiting for your next release so I have all the working samples then I'll update the docs here.

    Reacted by Thomas Schultz
  9. dhermes commented on Jun 7, 2016

    @dhermes
    dhermes
    on Jun 7, 2016
    Contributor
    More actions

    I can cut a release tomorrow. @tseaver Any reason not to?

  10. tseaver commented on Jun 7, 2016

    @tseaver
    tseaver
    on Jun 7, 2016
    Contributor
    More actions

    @dhermes nope.

  11. dhermes commented on Jun 7, 2016

    @dhermes
    dhermes
    on Jun 7, 2016
    Contributor
    More actions

    OK starting process now. I'll cc you on the release PR @waprin

  12. tseaver commented on Jun 15, 2016

    @tseaver
    tseaver
    on Jun 15, 2016
    Contributor
    More actions

    Docs fixed in #1848

  13. tseaver
    closed this as completedon Jun 15, 2016
  14. JustinBeckwith
    assigned
    tseaver
    on Feb 1, 2021
  15. parthea
    added a commit that references this issue on Mar 6, 2026

    feat: support range sql (#1807)

    d15d983
  16. parthea
    added a commit that references this issue on Apr 1, 2026

    refactor: Refactor polars scalar op compiler (#1807)

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

Metadata

Metadata

Assignees

  • @tseaver
    tseaver

Labels

api: loggingIssues related to the Cloud Logging API.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

    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.