Quentin123345 / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

ERROR: gcloud crashed (ImportError): No module named configparser #373

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

    Unsure. Running any gcloud command causes this issue. I notice that running `import configparser` from within google-cloud-sdk/lib/googlecloudsdk/calliope/base.py (I followed the statements down to where it was happening) returns the same ImportError. I tried upgrading six, and doing `import six; print six.__version__` returns 1.9.0 within that same base.py file, so I know it's not reading an old version.

What is the expected output? What do you see instead?

    I expect something to work. This may be of note, but this started happening after upgrading my kernel from 4.1.x to 4.3.x, and that gave me the dreaded "No module named datetime" in all of my virtualenvs (so I had to copy /usr/bin/python to each virtualenv I had installed). My installed python version is 2.7.10, and my Ubuntu version is 14.04.

    I can troubleshoot whatever you guys want.

Please provide any additional information below.

Traceback (most recent call last):
  File "googlecloudsdk/calliope/cli.py", line 605, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "googlecloudsdk/calliope/backend.py", line 1218, in Run
    last_group = context_filter(tool_context, Http, args)
  File "googlecloudsdk/calliope/backend.py", line 580, in ContextFilter
    group.Filter(context, args)
  File "googlecloudsdk/surface/container/__init__.py", line 54, in Filter
    api_version, endpoint_url, self.Http())
  File "googlecloudsdk/calliope/base.py", line 283, in Http
    return self._http_func(auth=auth, creds=creds, **kwargs)
  File "googlecloudsdk/calliope/backend.py", line 1213, in Http
    **kwargs)
  File "googlecloudsdk/core/cli.py", line 127, in Http
    creds = c_store.Load()
  File "googlecloudsdk/core/credentials/store.py", line 249, in Load
    Refresh(cred)
  File "googlecloudsdk/core/credentials/store.py", line 267, in Refresh
    creds.refresh(http or _Http())
  File "oauth2client/client.py", line 597, in refresh
    self._refresh(http.request)
  File "oauth2client/client.py", line 780, in _refresh
    self._do_refresh_request(http_request)
  File "oauth2client/client.py", line 799, in _do_refresh_request
    self.token_uri, method='POST', body=body, headers=headers)
  File "httplib2/__init__.py", line 1486, in request
    self.disable_ssl_certificate_validation)
  File "httplib2/__init__.py", line 944, in __init__
    cert_file=cert_file, strict=strict)
File "/usr/lib/python2.7/httplib.py", line 1257, in __init__
    context = ssl._create_default_https_context()
  File "/usr/lib/python2.7/ssl.py", line 491, in inner
    import configparser
ImportError: No module named configparser

Installation information:

Google Cloud SDK [0.9.85]

Platform: [Linux, x86_64]
Python Version: [2.7.10 (default, Oct 14 2015, 00:00:00)  [GCC 4.8.4]]
Site Packages: [Disabled]

Installation Root: [/home/joelinux/google-cloud-sdk]
Installed Components:
  core: [2015.10.30]
  core-nix: [2015.09.03]
  gcloud: [2015.10.30]
  gsutil-nix: [4.14]
  gsutil: [4.15]
  bq: [2.0.18]
  bq-nix: [2.0.18]
System PATH: 
[/home/joelinux/google-cloud-sdk/bin:/home/joelinux/.rbenv/shims:/usr/local/sbin
:/usr/lo
cal/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/joelinux
/.aws/bin:/home/joeli
nux/bin:/home/joelinux/Projects/Android/SDK/tools:/home/joelinux/Projects/Androi
d/SDK/platform-tools:
/home/joelinux/.npm/bin:/home/joelinux/.rbenv/bin:/home/joelinux/.gem/ruby/2.1.0
/bin:/opt/packer]
Cloud SDK on PATH: [True]

Installation Properties: [/home/joelinux/google-cloud-sdk/properties]
User Config Directory: [/home/joelinux/.config/gcloud]
User Properties: [/home/joelinux/.config/gcloud/properties]
Current Workspace: [None]
Workspace Config Directory: [None]
Workspace Properties: [None]

Original issue reported on code.google.com by jlouis.e...@gmail.com on 5 Nov 2015 at 4:03

GoogleCodeExporter commented 8 years ago
As an additional note, I attempted reinstalling the Google Cloud SDK, and it 
actually doesn't install at all, outputting the exact same ImportError (I 
somehow got it to install by re-running the `install.py` file manually, though 
it didn't fix the issue either).

Original comment by jlouis.e...@gmail.com on 5 Nov 2015 at 4:05

GoogleCodeExporter commented 8 years ago
Sorry we missed this. Thanks for reporting.

`configparser` is a standard Python module, so there's a serious problem with 
your Python installation. We can't really do anything on our end when working 
with a broken version of Python.

If you install a working Python version, you can set the environment variable 
CLOUDSDK_PYTHON to point to the correct binary, and everything should work.

Original comment by z...@google.com on 24 Nov 2015 at 7:18

GoogleCodeExporter commented 8 years ago
Actually, this could be an OSX thing too.  I just installed gcloud on my Mac 
(using unaltered system python) and I get the same problem.  I'd say the seious 
problem lies in gcloud, not python.

Original comment by mfis...@kushview.net on 19 Dec 2015 at 8:21

GoogleCodeExporter commented 8 years ago
As confirmed in another thread, the issue in #3 lies with the Python version 
used, not gcloud. Leaving WontFix.

Original comment by z...@google.com on 20 Dec 2015 at 2:59