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 — In Jupyter, Google.Cloud.Storage has no attribute Client Error (Works in Terminal) · Issue #3846 · googleapis/google-cloud-python

In Jupyter, Google.Cloud.Storage has no attribute Client Error (Works in Terminal) #3846

New issue
Copy link
New issue
Copy link
Closed
Closed
In Jupyter, Google.Cloud.Storage has no attribute Client Error (Works in Terminal)#3846
Copy link
Assignees
grahamanderson
Labels
api: storageIssues related to the Cloud Storage API.

Description

@grahamanderson
grahamanderson
opened on Aug 19, 2017
Issue body actions

On my macbook running Jupyter, From the below code, I get the error:
AttributeError: module 'google.cloud.storage' has no attribute 'Client'

Strangles the code Fails in Jupyter and Works in Interactive Mode (terminal)

I'm new to Google Cloud Storage, and help is appreciated...
much appreciation in advance

from google.cloud import storage
client = storage.Client(project="My Project")
bucket = client.get_bucket('my-bucket-name')
blob = bucket.blob('my-test-file.txt')
blob.upload_from_string('this is test content!')
  1. Mac 10.12.6

  2. Python 3.5.2 from Conda

  3. Pip Version: pip 9.0.1 from //anaconda/envs/gcs/lib/python3.5/site-packages (python 3.5)

  4. Pip Freeze for Google-Cloud (running under conda with a virtual environment: //anaconda/envs/gcs/bin/conda)
    google-auth==1.0.2
    google-cloud==0.27.0
    google-cloud-bigquery==0.26.0
    google-cloud-bigtable==0.26.0
    google-cloud-core==0.26.0
    google-cloud-datastore==1.2.0
    google-cloud-dns==0.26.0
    google-cloud-error-reporting==0.26.0
    google-cloud-language==0.27.0
    google-cloud-logging==1.2.0
    google-cloud-monitoring==0.26.0
    google-cloud-pubsub==0.27.0
    google-cloud-resource-manager==0.26.0
    google-cloud-runtimeconfig==0.26.0
    google-cloud-spanner==0.26.0
    google-cloud-speech==0.28.0
    google-cloud-storage==1.3.2
    google-cloud-translate==1.1.0
    google-cloud-videointelligence==0.25.0
    google-cloud-vision==0.26.0
    google-gax==0.15.14
    google-resumable-media==0.2.3
    googleapis-common-protos==1.5.2

  5. pip show google cloud
    Name: google-cloud
    Version: 0.27.0
    Summary: API Client library for Google Cloud
    Home-page: https://github.com/GoogleCloudPlatform/google-cloud-python
    Author: Google Cloud Platform
    Author-email: [email protected]
    License: Apache 2.0
    Location: /anaconda/envs/gcs/lib/python3.5/site-packages
    Requires: google-cloud-speech, google-cloud-bigtable, google-cloud-dns, google-cloud-core, google-cloud-datastore, google-cloud-error-reporting, google-cloud-bigquery, google-cloud-pubsub, google-cloud-translate, google-cloud-resource-manager, google-cloud-runtimeconfig, google-cloud-logging, google-cloud-language, google-cloud-videointelligence, google-cloud-monitoring, google-cloud-vision, google-cloud-storage, google-cloud-spanner

Activity

  1. grahamanderson
    changed the title [-]Google.Cloud.Storage has no attribute Client Error (How to fix?)[/-] [+]In Jupyter, Google.Cloud.Storage has no attribute Client Error (Works in Terminal)[/+] on Aug 19, 2017
  2. grahamanderson commented on Aug 19, 2017

    @grahamanderson
    grahamanderson
    on Aug 19, 2017
    Author
    More actions

    Solved it:
    For others who might be struggling...

    • Install a virtual environment (conda)
    • Install nbconda (conda) so jupyter knows which environment it's running in...
  3. grahamanderson
    closed this as completedon Aug 19, 2017
  4. dhermes
    added
    api: storageIssues related to the Cloud Storage API.
    on Sep 27, 2017
  5. JustinBeckwith
    assigned
    grahamanderson
    on Feb 1, 2021
  6. parthea
    added a commit that references this issue on Jun 4, 2023

    chore: move samples from python-docs-samples (#41)

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

Metadata

Metadata

Assignees

  • @grahamanderson
    grahamanderson

Labels

api: storageIssues related to the Cloud Storage 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.