tilezen / cocotoca

An overzooming microservice.
MIT License
0 stars 0 forks source link

AttributeError: 'module' object has no attribute 'clipping' #1

Open nvkelso opened 7 years ago

nvkelso commented 7 years ago

Running the tests with python setup.py test for me (even after an install) yields the following error on my setup:

running test
running egg_info
writing requirements to cocotoca.egg-info/requires.txt
writing cocotoca.egg-info/PKG-INFO
writing top-level names to cocotoca.egg-info/top_level.txt
writing dependency_links to cocotoca.egg-info/dependency_links.txt
reading manifest file 'cocotoca.egg-info/SOURCES.txt'
writing manifest file 'cocotoca.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
  File "setup.py", line 24, in <module>
    tests_require=[
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Library/Python/2.7/site-packages/setuptools/command/test.py", line 172, in run
    self.run_tests()
  File "/Library/Python/2.7/site-packages/setuptools/command/test.py", line 193, in run_tests
    testRunner=self._resolve_as_ep(self.test_runner),
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 149, in parseArgs
    self.createTests()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 158, in createTests
    self.module)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 103, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/Library/Python/2.7/site-packages/setuptools/command/test.py", line 40, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'clipping'

I'm running Python 2.7.6 (default, Sep 9 2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin.

zerebubuth commented 7 years ago

I've seen that error before when tests/__init__.py is missing... but that file seems to exist. I wonder whether it's because of a missing dependency? I've added a step in the README (https://github.com/tilezen/cocotoca/commit/009d08e52bc62e9a587bb0d7418d90b5afe879da) to pip install -Ur requirements.txt. Could you update to the latest master and give it another try, please?

nvkelso commented 7 years ago

Running pip install -Ur requirements.txt gets all the way to... and fails:

  Found existing installation: mapbox-vector-tile 0.5.0.dev0
    Uninstalling mapbox-vector-tile-0.5.0.dev0:
      Successfully uninstalled mapbox-vector-tile-0.5.0.dev0
  Running setup.py install for mapbox-vector-tile ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-hbk9Pk/mapbox-vector-tile/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-LWogyD-record/install-record.txt --single-version-externally-managed --compile:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Library/Python/2.7/site-packages/setuptools/__init__.py", line 12, in <module>
        import setuptools.version
      File "/Library/Python/2.7/site-packages/setuptools/version.py", line 1, in <module>
        import pkg_resources
      File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
        import packaging.requirements
      File "/Library/Python/2.7/site-packages/packaging/requirements.py", line 59, in <module>
        MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
    TypeError: __call__() takes exactly 2 arguments (1 given)

    ----------------------------------------
  Rolling back uninstall of mapbox-vector-tile
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-hbk9Pk/mapbox-vector-tile/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-LWogyD-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-hbk9Pk/mapbox-vector-tile/
zerebubuth commented 7 years ago

Looks like it might be a version conflict between setuptools and pyparsing - at least, that's what this Stack Overflow answer suggests. Could you run the following in your virtualenv and paste back the response, please?

$ pip --version
pip 1.5.6 from /home/matt/Programming/Mapzen/env/local/lib/python2.7/site-packages (python 2.7)
$ pip list | grep setuptools
setuptools (24.0.2)
$ pip list | grep pyparsing
pyparsing (2.1.9)

Hopefully we can find a version which works for everything.

nvkelso commented 7 years ago

$ pip --version
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 7, in <module>
    from pip import main
  File "/Library/Python/2.7/site-packages/pip/__init__.py", line 26, in <module>
    from pip.utils import get_installed_distributions, get_prog
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 27, in <module>
    from pip._vendor import pkg_resources
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>
    @_call_aside
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
    f(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
    dist.activate(replace=False)
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
    declare_namespace(pkg)
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
    _handle_ns(packageName, path_item)
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2091, in _handle_ns
    loader.load_module(packageName)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 246, in load_module
    mod = imp.load_module(fullname, self.file, self.filename, self.etc)
  File "/Library/Python/2.7/site-packages/matplotlib-override/mpl_toolkits/__init__.py", line 2, in <module>
    __import__('pkg_resources').declare_namespace(__name__)
  File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/Library/Python/2.7/site-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)

$ pip list | grep setuptools
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 7, in <module>
    from pip import main
  File "/Library/Python/2.7/site-packages/pip/__init__.py", line 26, in <module>
    from pip.utils import get_installed_distributions, get_prog
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 27, in <module>
    from pip._vendor import pkg_resources
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>
    @_call_aside
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
    f(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
    dist.activate(replace=False)
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
    declare_namespace(pkg)
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
    _handle_ns(packageName, path_item)
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2091, in _handle_ns
    loader.load_module(packageName)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 246, in load_module
    mod = imp.load_module(fullname, self.file, self.filename, self.etc)
  File "/Library/Python/2.7/site-packages/matplotlib-override/mpl_toolkits/__init__.py", line 2, in <module>
    __import__('pkg_resources').declare_namespace(__name__)
  File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/Library/Python/2.7/site-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)

$ pip list | grep pyparsing
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 7, in <module>
    from pip import main
  File "/Library/Python/2.7/site-packages/pip/__init__.py", line 26, in <module>
    from pip.utils import get_installed_distributions, get_prog
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 27, in <module>
    from pip._vendor import pkg_resources
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>
    @_call_aside
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
    f(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
    dist.activate(replace=False)
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
    declare_namespace(pkg)
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
    _handle_ns(packageName, path_item)
  File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2091, in _handle_ns
    loader.load_module(packageName)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 246, in load_module
    mod = imp.load_module(fullname, self.file, self.filename, self.etc)
  File "/Library/Python/2.7/site-packages/matplotlib-override/mpl_toolkits/__init__.py", line 2, in <module>
    __import__('pkg_resources').declare_namespace(__name__)
  File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/Library/Python/2.7/site-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)
zerebubuth commented 7 years ago

Looks like we broke your virtualenv, sorry! Could you make a new one and let me know what the results are from that, please?