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 — Pubsub.list_topics fails when there are no topics · Issue #1439 · googleapis/google-cloud-python

Pubsub.list_topics fails when there are no topics #1439

New issue
Copy link
New issue
Copy link
Closed
Closed
Pubsub.list_topics fails when there are no topics#1439
Copy link
Assignees
tseaver
Labels
api: pubsubIssues related to the Pub/Sub API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@dhermes
dhermes
opened on Feb 2, 2016
Issue body actions

Offending line. Reproduce via:

client = pubsub.Client()
>>> client.list_topics()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "gcloud/pubsub/client.py", line 80, in list_topics
    for resource in resp['topics']]
KeyError: 'topics'

@tseaver ISTM we should locate all instances where we assume a key is present and just protect against this. The time between releases behooves us to be "protective" of users. (I realize that we've usually done it this way based on documented outputs.)

Activity

  1. dhermes
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: pubsubIssues related to the Pub/Sub API.
    on Feb 2, 2016
  2. dhermes
    assigned
    tseaver
    on Feb 2, 2016
  3. dhermes commented on Feb 2, 2016

    @dhermes
    dhermes
    on Feb 2, 2016
    ContributorAuthor
    More actions

    Found while reproducing #1438

  4. tseaver
    closed this as completedin d725d2fon Feb 15, 2016
  5. parthea
    added a commit that references this issue on Nov 24, 2025

    chore(test): update Showcase version; make protoc version an env var (#…

    ddd3723
  6. parthea
    added a commit that references this issue on Mar 6, 2026

    docs: create sample to write schema file from table (#1439)

    ed635ac
  7. parthea
    added a commit that references this issue on Sep 8, 2026

    docs: migrate code from googleapis/python-bigquery (#18303)

    23f9a74
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: pubsubIssues related to the Pub/Sub 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.