oturns / geosnap

The Geospatial Neighborhood Analysis Package
https://oturns.github.io/geosnap-guide
BSD 3-Clause "New" or "Revised" License
247 stars 32 forks source link

import broken with newer quilt versions #201

Closed knaaptime closed 4 years ago

knaaptime commented 4 years ago

on first import, geosnap looks for a stored quilt package and creates a new one if it's not found. As of quilt3 version 3.1.10 (could be 3.1.9, i havent checked) this fails with the following

In [1]: import geosnap
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-ff6b1fcf64ae> in <module>
----> 1 import geosnap

~/anaconda3/envs/toss/lib/python3.8/site-packages/geosnap/__init__.py in <module>
     27 # __version__ has to be define in the first line
     28
---> 29 from . import analyze
     30 from . import io
     31 from . import util

~/anaconda3/envs/toss/lib/python3.8/site-packages/geosnap/analyze/__init__.py in <module>
----> 1 from .analytics import cluster, cluster_spatial
      2 from .dynamics import sequence, transition
      3 from .incs import linc
      4
      5 __all__ = ['linc', 'sequence', 'transition', 'cluster', 'cluster_spatial']

~/anaconda3/envs/toss/lib/python3.8/site-packages/geosnap/analyze/analytics.py in <module>
     11 from libpysal.weights.distance import KNN
     12
---> 13 from .._data import _Map
     14 from .cluster import (
     15     affinity_propagation,

~/anaconda3/envs/toss/lib/python3.8/site-packages/geosnap/_data.py in <module>
     21 # look for local storage and create if missing
     22 try:
---> 23     from quilt3.data.geosnap_data import storage
     24 except ImportError:
     25     storage = quilt3.Package()

~/anaconda3/envs/toss/lib/python3.8/importlib/_bootstrap.py in _find_and_load(name, import_)

~/anaconda3/envs/toss/lib/python3.8/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

~/anaconda3/envs/toss/lib/python3.8/importlib/_bootstrap.py in _load_unlocked(spec)

~/anaconda3/envs/toss/lib/python3.8/site-packages/quilt3/imports.py in exec_module(cls, module)
     44
     45             # we do not know the name the user will ask for, so populate all valid names
---> 46             for pkg in _list_packages():
     47                 pkg_user, pkg_name = pkg.split('/')
     48                 if pkg_user == namespace:

TypeError: _list_packages() missing 1 required positional argument: 'registry'

downgrading back to quilt3 3.1.8 resolves the issue (see https://github.com/quiltdata/quilt/issues/1522)

knaaptime commented 4 years ago

confirming this was introduced with quilt3 v3.1.9

knaaptime commented 4 years ago

resolved by #208