Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running gsutil fails after updating via pip #470

Closed
yodax opened this issue Sep 22, 2017 · 5 comments
Closed

Running gsutil fails after updating via pip #470

yodax opened this issue Sep 22, 2017 · 5 comments

Comments

@yodax
Copy link

yodax commented Sep 22, 2017

Yesterday I've update gsutil and since then it fails from the command line with the following stack trace:

$ gsutil
Traceback (most recent call last):
  File "/usr/local/bin/gsutil", line 11, in <module>
    load_entry_point('gsutil==4.27', 'console_scripts', 'gsutil')()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 570, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2751, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2405, in load
    return self.resolve()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2411, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python2.7/site-packages/gslib/__main__.py", line 51, in <module>
    from gslib import metrics
  File "/usr/local/lib/python2.7/site-packages/gslib/metrics.py", line 39, in <module>
    from gslib.util import CalculateThroughput
  File "/usr/local/lib/python2.7/site-packages/gslib/util.py", line 39, in <module>
    from apitools.base.py import http_wrapper
  File "/usr/local/lib/python2.7/site-packages/apitools/base/py/__init__.py", line 20, in <module>
    from apitools.base.py.base_api import *
  File "/usr/local/lib/python2.7/site-packages/apitools/base/py/base_api.py", line 31, in <module>
    from apitools.base.protorpclite import message_types
  File "/usr/local/lib/python2.7/site-packages/apitools/base/protorpclite/message_types.py", line 25, in <module>
    from apitools.base.protorpclite import messages
  File "/usr/local/lib/python2.7/site-packages/apitools/base/protorpclite/messages.py", line 1168, in <module>
    class Field(six.with_metaclass(_FieldMeta, object)):
TypeError: Error when calling the metaclass bases
    metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

This is installed on FreeBSD 11.1 via pip. It was upgrade via pip install --upgrade gsutil.

The same setup has worked just fine for many years now. (, wel not on FreeBSD 11.1 since that isn't out for years, but on the same install)

It's probably one of the dependencies giving a problem, I think.

It's almost weekend so no rush of course. 😄

@cherba29
Copy link

BTW 'google-apitools==0.5.15' has a fix for this... but gsutil is pinned to version 0.5.3.
Alternatively you need to pin six package.

@yodax
Copy link
Author

yodax commented Sep 22, 2017

Thanks! I pinnend six to the previous version as a temporary fix.

@houglum
Copy link
Collaborator

houglum commented Oct 12, 2017

Released v4.28 today, which pins to v0.5.16 of apitools. Marking as fixed.

@houglum houglum closed this as completed Oct 12, 2017
@yodax
Copy link
Author

yodax commented Oct 14, 2017

Thanks!

@tankorsmash
Copy link

tankorsmash commented Apr 28, 2018

For anyone else with the issue, pip install six==1.10.0 is the version of six. I needed to use pip2, for Python2.7 but that's dependant on your own Python. pip or pip3 might work too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants