umap icon indicating copy to clipboard operation
umap copied to clipboard

RuntimeError: cannot cache function 'sparse_correct_alternative_cosine': no locator available for file '/Users/dbl/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/sparse.py'

Open dbl001 opened this issue 5 years ago • 6 comments

I am running Anaconda Python 3.6.11

I am getting this error running the example program mnist_torus_sphere_example.py: E.g.

$ python mnist_torus_sphere_example.py 
 
Traceback (most recent call last):
  File "mnist_torus_sphere_example.py", line 10, in <module>
    import umap
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/umap_learn-0.4.6-py3.6.egg/umap/__init__.py", line 1, in <module>
    from .umap_ import UMAP
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/umap_learn-0.4.6-py3.6.egg/umap/umap_.py", line 62, in <module>
    from pynndescent import NNDescent
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/__init__.py", line 3, in <module>
    import util
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/pynndescent_.py", line 15, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/sparse.py", line 445, in <module>
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/decorators.py", line 118, in wrap
    vec = Vectorize(func, **kws)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/decorators.py", line 38, in __new__
    return imp(func, identity=identity, cache=cache, targetoptions=kws)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/dufunc.py", line 83, in __init__
    **targetoptions)(py_func)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/core/decorators.py", line 211, in wrapper
    disp.enable_caching()
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/ufuncbuilder.py", line 75, in enable_caching
    self.cache = FunctionCache(self.py_func)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/core/caching.py", line 620, in __init__
    self._impl = self._impl_class(py_func)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/core/caching.py", line 356, in __init__
    "for file %r" % (qualname, source_path))
RuntimeError: cannot cache function 'sparse_correct_alternative_cosine': no locator available for file '/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/sparse.py'

and

$ ipython
Python 3.6.11 | packaged by conda-forge | (default, Aug  5 2020, 20:19:23) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import umap
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-1-623e299b05c0> in <module>
----> 1 import umap

~/anaconda/envs/lda2vec/lib/python3.6/site-packages/umap_learn-0.4.6-py3.6.egg/umap/__init__.py in <module>
----> 1 from .umap_ import UMAP
      2 
      3 # Workaround: https://github.com/numba/numba/issues/3341
      4 import numba
      5 

~/anaconda/envs/lda2vec/lib/python3.6/site-packages/umap_learn-0.4.6-py3.6.egg/umap/umap_.py in <module>
     60 try:
     61     # Use pynndescent, if installed (python 3 only)
---> 62     from pynndescent import NNDescent
     63     from pynndescent.distances import named_distances as pynn_named_distances
     64     from pynndescent.sparse import sparse_named_distances as pynn_sparse_named_distances

~/anaconda/envs/lda2vec/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)

~/anaconda/envs/lda2vec/lib/python3.6/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

~/anaconda/envs/lda2vec/lib/python3.6/importlib/_bootstrap.py in _load_unlocked(spec)

~/anaconda/envs/lda2vec/lib/python3.6/importlib/_bootstrap.py in _load_backward_compatible(spec)

~/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/__init__.py in <module>
      1 import pkg_resources
      2 import numba
----> 3 from .pynndescent_ import NNDescent, PyNNDescentTransformer
      4 
      5 # Workaround: https://github.com/numba/numba/issues/3341

~/anaconda/envs/lda2vec/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)

~/anaconda/envs/lda2vec/lib/python3.6/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

~/anaconda/envs/lda2vec/lib/python3.6/importlib/_bootstrap.py in _load_unlocked(spec)

~/anaconda/envs/lda2vec/lib/python3.6/importlib/_bootstrap.py in _load_backward_compatible(spec)

~/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/pynndescent_.py in <module>
     13 import heapq
     14 
---> 15 import pynndescent.sparse as sparse
     16 import pynndescent.sparse_nndescent as sparse_nnd
     17 import pynndescent.distances as dist

~/anaconda/envs/lda2vec/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)

~/anaconda/envs/lda2vec/lib/python3.6/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

~/anaconda/envs/lda2vec/lib/python3.6/importlib/_bootstrap.py in _load_unlocked(spec)

~/anaconda/envs/lda2vec/lib/python3.6/importlib/_bootstrap.py in _load_backward_compatible(spec)

~/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/sparse.py in <module>
    443 
    444 
--> 445 @numba.vectorize(fastmath=True, cache=True)
    446 def sparse_correct_alternative_cosine(d):
    447     if isclose(0.0, abs(d), atol=1e-7) or d < 0.0:

~/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/decorators.py in wrap(func)
    116 
    117     def wrap(func):
--> 118         vec = Vectorize(func, **kws)
    119         for sig in ftylist:
    120             vec.add(sig)

~/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/decorators.py in __new__(cls, func, **kws)
     36         cache = cls.get_cache(kws)
     37         imp = cls.get_target_implementation(kws)
---> 38         return imp(func, identity=identity, cache=cache, targetoptions=kws)
     39 
     40 

~/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/dufunc.py in __init__(self, py_func, identity, cache, targetoptions)
     81         dispatcher = jit(_target='npyufunc',
     82                          cache=cache,
---> 83                          **targetoptions)(py_func)
     84         self._initialize(dispatcher, identity)
     85 

~/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/core/decorators.py in wrapper(func)
    209                           **dispatcher_args)
    210         if cache:
--> 211             disp.enable_caching()
    212         if sigs is not None:
    213             # Register the Dispatcher to the type inference mechanism,

~/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/ufuncbuilder.py in enable_caching(self)
     73 
     74     def enable_caching(self):
---> 75         self.cache = FunctionCache(self.py_func)
     76 
     77     def compile(self, sig, locals={}, **targetoptions):

~/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/core/caching.py in __init__(self, py_func)
    618         self._name = repr(py_func)
    619         self._py_func = py_func
--> 620         self._impl = self._impl_class(py_func)
    621         self._cache_path = self._impl.locator.get_cache_path()
    622         # This may be a bit strict but avoids us maintaining a magic number

~/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/core/caching.py in __init__(self, py_func)
    354         else:
    355             raise RuntimeError("cannot cache function %r: no locator available "
--> 356                                "for file %r" % (qualname, source_path))
    357         self._locator = locator
    358         # Use filename base name as module name to avoid conflict between

RuntimeError: cannot cache function 'sparse_correct_alternative_cosine': no locator available for file '/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/sparse.py'

dbl001 avatar Aug 31 '20 17:08 dbl001

I would suggest trying to upgrade numba. I admit that I am not entirely sure what has gone astray here.

lmcinnes avatar Aug 31 '20 19:08 lmcinnes

$ conda install -c conda-forge umap-learn
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/davidlaxer/anaconda/envs/lda2vec

  added / updated specs:
    - umap-learn


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    umap-learn-0.4.6           |   py36h9f0ad1d_0         110 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         110 KB

The following NEW packages will be INSTALLED:

  scikit-learn       conda-forge/osx-64::scikit-learn-0.23.2-py36h637a150_0
  threadpoolctl      conda-forge/noarch::threadpoolctl-2.1.0-pyh5ca1d4c_0
  umap-learn         conda-forge/osx-64::umap-learn-0.4.6-py36h9f0ad1d_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
umap-learn-0.4.6     | 110 KB    | ##################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(lda2vec) MacBook-Pro:umap davidlaxer$ cd examples
(lda2vec) MacBook-Pro:examples davidlaxer$ python mnist_torus_sphere_example.py 
Traceback (most recent call last):
  File "mnist_torus_sphere_example.py", line 10, in <module>
    import umap
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/umap/__init__.py", line 1, in <module>
    from .umap_ import UMAP
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/umap/umap_.py", line 62, in <module>
    from pynndescent import NNDescent
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/__init__.py", line 3, in <module>
    import util
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/pynndescent_.py", line 15, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/sparse.py", line 445, in <module>
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/decorators.py", line 118, in wrap
    vec = Vectorize(func, **kws)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/decorators.py", line 38, in __new__
    return imp(func, identity=identity, cache=cache, targetoptions=kws)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/dufunc.py", line 83, in __init__
    **targetoptions)(py_func)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/core/decorators.py", line 211, in wrapper
    disp.enable_caching()
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/ufuncbuilder.py", line 75, in enable_caching
    self.cache = FunctionCache(self.py_func)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/core/caching.py", line 620, in __init__
    self._impl = self._impl_class(py_func)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/core/caching.py", line 356, in __init__
    "for file %r" % (qualname, source_path))
RuntimeError: cannot cache function 'sparse_correct_alternative_cosine': no locator available for file '/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/sparse.py'
(lda2vec) MacBook-Pro:examples davidlaxer$ conda list numba
# packages in environment at /Users/davidlaxer/anaconda/envs/lda2vec:
#
# Name                    Version                   Build  Channel
numba                     0.51.1           py36h72eec15_0    conda-forge
(lda2vec) MacBook-Pro:examples davidlaxer$ conda upgrade numba
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/davidlaxer/anaconda/envs/lda2vec

  added / updated specs:
    - numba


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    prompt-toolkit-3.0.7       |             py_0         235 KB  conda-forge
    prompt_toolkit-3.0.7       |                0           4 KB  conda-forge
    statsmodels-0.12.0         |   py36h9de38fb_0        10.6 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        10.8 MB

The following NEW packages will be INSTALLED:

  libgfortran4       conda-forge/osx-64::libgfortran4-7.5.0-h1565451_3

The following packages will be UPDATED:

  libgfortran                                       4.0.0-2 --> 4.0.0-3
  prompt-toolkit                                 3.0.6-py_0 --> 3.0.7-py_0
  prompt_toolkit                                    3.0.6-0 --> 3.0.7-0
  statsmodels                         0.11.1-py36h37b9a7d_2 --> 0.12.0-py36h9de38fb_0
  zlib                                          1.2.11-1007 --> 1.2.11-h7795811_1009


Proceed ([y]/n)? y


Downloading and Extracting Packages
prompt-toolkit-3.0.7 | 235 KB    | ##################################### | 100% 
prompt_toolkit-3.0.7 | 4 KB      | ##################################### | 100% 
statsmodels-0.12.0   | 10.6 MB   | ##################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(lda2vec) MacBook-Pro:examples davidlaxer$ conda list numba
# packages in environment at /Users/davidlaxer/anaconda/envs/lda2vec:
#
# Name                    Version                   Build  Channel
numba                     0.51.1           py36h72eec15_0    conda-forge
(lda2vec) MacBook-Pro:examples davidlaxer$ python mnist_torus_sphere_example.py 
Traceback (most recent call last):
  File "mnist_torus_sphere_example.py", line 10, in <module>
    import umap
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/umap/__init__.py", line 1, in <module>
    from .umap_ import UMAP
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/umap/umap_.py", line 62, in <module>
    from pynndescent import NNDescent
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/__init__.py", line 3, in <module>
    import util
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/pynndescent_.py", line 15, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/sparse.py", line 445, in <module>
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/decorators.py", line 118, in wrap
    vec = Vectorize(func, **kws)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/decorators.py", line 38, in __new__
    return imp(func, identity=identity, cache=cache, targetoptions=kws)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/dufunc.py", line 83, in __init__
    **targetoptions)(py_func)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/core/decorators.py", line 211, in wrapper
    disp.enable_caching()
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/np/ufunc/ufuncbuilder.py", line 75, in enable_caching
    self.cache = FunctionCache(self.py_func)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/core/caching.py", line 620, in __init__
    self._impl = self._impl_class(py_func)
  File "/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/numba/core/caching.py", line 356, in __init__
    "for file %r" % (qualname, source_path))
RuntimeError: cannot cache function 'sparse_correct_alternative_cosine': no locator available for file '/Users/davidlaxer/anaconda/envs/lda2vec/lib/python3.6/site-packages/pynndescent-0.4.8-py3.6.egg/pynndescent/sparse.py'
(lda2vec) MacBook-Pro:examples davidlaxer$ 

dbl001 avatar Aug 31 '20 19:08 dbl001

Any clues here?

https://github.com/numba/numba/issues/4908

dbl001 avatar Aug 31 '20 19:08 dbl001

It might be down to the zipsafe issue in pynndescent. That means you can either re-install pynndescent (by getting a copy from the repository and setting the zipsafe=False argument in the setup.py and installing), or simply remove the cache=True arguments on any functions. The latter is definitely harder, but will operate in place on your environment if you wish.

Edit: I have updated the dev branch of pynndescent to fix this, and hopefully I will be putting out an RC release with this fix in it soon.

lmcinnes avatar Sep 01 '20 16:09 lmcinnes

Setting zipsafe=False, resolved the error. Any ideas on this exception? (Open a new issue?)

$ python mnist_torus_sphere_example.py 
UMAP(n_neighbors=10, random_state=42, verbose=True)
Construct fuzzy simplicial set
Tue Sep  1 10:44:25 2020 Finding Nearest Neighbors
Tue Sep  1 10:44:30 2020 Finished Nearest Neighbor Search
Tue Sep  1 10:44:35 2020 Construct embedding
	completed  0  /  500 epochs
	completed  50  /  500 epochs
	completed  100  /  500 epochs
	completed  150  /  500 epochs
	completed  200  /  500 epochs
	completed  250  /  500 epochs
	completed  300  /  500 epochs
	completed  350  /  500 epochs
	completed  400  /  500 epochs
	completed  450  /  500 epochs
Tue Sep  1 10:44:42 2020 Finished embedding
2020-09-01 10:44:42.967 python[63078:24525645] -[QNSApplication macMinorVersion]: unrecognized selector sent to instance 0x7f8c3462bb10
2020-09-01 10:44:42.988 python[63078:24525645] An uncaught exception was raised
2020-09-01 10:44:42.989 python[63078:24525645] -[QNSApplication macMinorVersion]: unrecognized selector sent to instance 0x7f8c3462bb10
2020-09-01 10:44:42.989 python[63078:24525645] (
	0   CoreFoundation                      0x00007fff89e87452 __exceptionPreprocess + 178
	1   libobjc.A.dylib                     0x00007fff94fbe73c objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff89ef118d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
	3   CoreFoundation                      0x00007fff89df74c1 ___forwarding___ + 1009
	4   CoreFoundation                      0x00007fff89df7048 _CF_forwarding_prep_0 + 120
	5   libtk8.6.dylib                      0x00000001223663a9 SetCGColorComponents + 265
	6   libtk8.6.dylib                      0x0000000122366c5a TkpGetColor + 250
	7   libtk8.6.dylib                      0x00000001222a1059 Tk_GetColor + 153
	8   libtk8.6.dylib                      0x0000000122290f16 Tk_Get3DBorder + 134
	9   libtk8.6.dylib                      0x0000000122290d7f Tk_Alloc3DBorderFromObj + 127
	10  libtk8.6.dylib                      0x00000001222a255d DoObjConfig + 941
	11  libtk8.6.dylib                      0x00000001222a2095 Tk_InitOptions + 357
	12  libtk8.6.dylib                      0x00000001222a1f75 Tk_InitOptions + 69
	13  libtk8.6.dylib                      0x00000001222d310c CreateFrame + 1548
	14  libtk8.6.dylib                      0x00000001222d33e7 TkListCreateFrame + 151
	15  libtk8.6.dylib                      0x00000001222cada8 Initialize + 2168
	16  _tkinter.cpython-36m-darwin.so      0x00000001220fbafc Tkapp_New + 892
	17  _tkinter.cpython-36m-darwin.so      0x00000001220fb621 _tkinter_create + 289
	18  python                              0x000000010327a570 _PyCFunction_FastCallDict + 256
	19  python                              0x000000010334607a call_function + 154
	20  python                              0x000000010333e688 _PyEval_EvalFrameDefault + 22536
	21  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	22  python                              0x0000000103346dfd _PyFunction_FastCallDict + 413
	23  python                              0x00000001031fe350 _PyObject_FastCallDict + 336
	24  python                              0x000000010322395a method_call + 122
	25  python                              0x000000010320482e PyObject_Call + 62
	26  python                              0x00000001032a1485 slot_tp_init + 117
	27  python                              0x00000001032a685b type_call + 235
	28  python                              0x00000001031fe2c2 _PyObject_FastCallDict + 194
	29  python                              0x00000001032054a7 _PyObject_FastCallKeywords + 327
	30  python                              0x0000000103346194 call_function + 436
	31  python                              0x000000010333e721 _PyEval_EvalFrameDefault + 22689
	32  python                              0x00000001033464e1 fast_function + 225
	33  python                              0x0000000103346132 call_function + 338
	34  python                              0x000000010333e688 _PyEval_EvalFrameDefault + 22536
	35  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	36  python                              0x0000000103346dfd _PyFunction_FastCallDict + 413
	37  python                              0x00000001031fe350 _PyObject_FastCallDict + 336
	38  python                              0x000000010322395a method_call + 122
	39  python                              0x000000010320482e PyObject_Call + 62
	40  python                              0x000000010333e807 _PyEval_EvalFrameDefault + 22919
	41  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	42  python                              0x0000000103243bbd function_call + 125
	43  python                              0x000000010320482e PyObject_Call + 62
	44  python                              0x000000010333e807 _PyEval_EvalFrameDefault + 22919
	45  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	46  python                              0x000000010334657b fast_function + 379
	47  python                              0x0000000103346132 call_function + 338
	48  python                              0x000000010333e688 _PyEval_EvalFrameDefault + 22536
	49  python                              0x00000001033464e1 fast_function + 225
	50  python                              0x0000000103346132 call_function + 338
	51  python                              0x000000010333e688 _PyEval_EvalFrameDefault + 22536
	52  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	53  python                              0x000000010334657b fast_function + 379
	54  python                              0x0000000103346132 call_function + 338
	55  python                              0x000000010333e688 _PyEval_EvalFrameDefault + 22536
	56  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	57  python                              0x000000010334657b fast_function + 379
	58  python                              0x0000000103346132 call_function + 338
	59  python                              0x000000010333e721 _PyEval_EvalFrameDefault + 22689
	60  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	61  python                              0x000000010339ac8b PyRun_FileExFlags + 235
	62  python                              0x000000010339a658 PyRun_SimpleFileExFlags + 504
	63  python                              0x00000001033bfd8a run_file + 170
	64  python                              0x00000001033beed4 Py_Main + 2772
	65  python                              0x00000001031f7374 main + 276
	66  libdyld.dylib                       0x00007fff93c315ad start + 1
)
2020-09-01 10:44:42.994 python[63078:24525645] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[QNSApplication macMinorVersion]: unrecognized selector sent to instance 0x7f8c3462bb10'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff89e87452 __exceptionPreprocess + 178
	1   libobjc.A.dylib                     0x00007fff94fbe73c objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff89ef118d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
	3   CoreFoundation                      0x00007fff89df74c1 ___forwarding___ + 1009
	4   CoreFoundation                      0x00007fff89df7048 _CF_forwarding_prep_0 + 120
	5   libtk8.6.dylib                      0x00000001223663a9 SetCGColorComponents + 265
	6   libtk8.6.dylib                      0x0000000122366c5a TkpGetColor + 250
	7   libtk8.6.dylib                      0x00000001222a1059 Tk_GetColor + 153
	8   libtk8.6.dylib                      0x0000000122290f16 Tk_Get3DBorder + 134
	9   libtk8.6.dylib                      0x0000000122290d7f Tk_Alloc3DBorderFromObj + 127
	10  libtk8.6.dylib                      0x00000001222a255d DoObjConfig + 941
	11  libtk8.6.dylib                      0x00000001222a2095 Tk_InitOptions + 357
	12  libtk8.6.dylib                      0x00000001222a1f75 Tk_InitOptions + 69
	13  libtk8.6.dylib                      0x00000001222d310c CreateFrame + 1548
	14  libtk8.6.dylib                      0x00000001222d33e7 TkListCreateFrame + 151
	15  libtk8.6.dylib                      0x00000001222cada8 Initialize + 2168
	16  _tkinter.cpython-36m-darwin.so      0x00000001220fbafc Tkapp_New + 892
	17  _tkinter.cpython-36m-darwin.so      0x00000001220fb621 _tkinter_create + 289
	18  python                              0x000000010327a570 _PyCFunction_FastCallDict + 256
	19  python                              0x000000010334607a call_function + 154
	20  python                              0x000000010333e688 _PyEval_EvalFrameDefault + 22536
	21  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	22  python                              0x0000000103346dfd _PyFunction_FastCallDict + 413
	23  python                              0x00000001031fe350 _PyObject_FastCallDict + 336
	24  python                              0x000000010322395a method_call + 122
	25  python                              0x000000010320482e PyObject_Call + 62
	26  python                              0x00000001032a1485 slot_tp_init + 117
	27  python                              0x00000001032a685b type_call + 235
	28  python                              0x00000001031fe2c2 _PyObject_FastCallDict + 194
	29  python                              0x00000001032054a7 _PyObject_FastCallKeywords + 327
	30  python                              0x0000000103346194 call_function + 436
	31  python                              0x000000010333e721 _PyEval_EvalFrameDefault + 22689
	32  python                              0x00000001033464e1 fast_function + 225
	33  python                              0x0000000103346132 call_function + 338
	34  python                              0x000000010333e688 _PyEval_EvalFrameDefault + 22536
	35  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	36  python                              0x0000000103346dfd _PyFunction_FastCallDict + 413
	37  python                              0x00000001031fe350 _PyObject_FastCallDict + 336
	38  python                              0x000000010322395a method_call + 122
	39  python                              0x000000010320482e PyObject_Call + 62
	40  python                              0x000000010333e807 _PyEval_EvalFrameDefault + 22919
	41  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	42  python                              0x0000000103243bbd function_call + 125
	43  python                              0x000000010320482e PyObject_Call + 62
	44  python                              0x000000010333e807 _PyEval_EvalFrameDefault + 22919
	45  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	46  python                              0x000000010334657b fast_function + 379
	47  python                              0x0000000103346132 call_function + 338
	48  python                              0x000000010333e688 _PyEval_EvalFrameDefault + 22536
	49  python                              0x00000001033464e1 fast_function + 225
	50  python                              0x0000000103346132 call_function + 338
	51  python                              0x000000010333e688 _PyEval_EvalFrameDefault + 22536
	52  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	53  python                              0x000000010334657b fast_function + 379
	54  python                              0x0000000103346132 call_function + 338
	55  python                              0x000000010333e688 _PyEval_EvalFrameDefault + 22536
	56  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	57  python                              0x000000010334657b fast_function + 379
	58  python                              0x0000000103346132 call_function + 338
	59  python                              0x000000010333e721 _PyEval_EvalFrameDefault + 22689
	60  python                              0x000000010333780b _PyEval_EvalCodeWithName + 539
	61  python                              0x000000010339ac8b PyRun_FileExFlags + 235
	62  python                              0x000000010339a658 PyRun_SimpleFileExFlags + 504
	63  python                              0x00000001033bfd8a run_file + 170
	64  python                              0x00000001033beed4 Py_Main + 2772
	65  python                              0x00000001031f7374 main + 276
	66  libdyld.dylib                       0x00007fff93c315ad start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

dbl001 avatar Sep 01 '20 17:09 dbl001

Hi, I'm having the same issue when deploying BERT onto an EC2 instance... the only read/writable directory is public/files and I think it's trying to write the cache into a somewhere it doesn't have permission to. Is there any way to change the default ?

Thanks!

cannot cache function 'sparse_correct_alternative_cosine': no locator available for file '/var/www/html/periscopebe/dev/venv/lib/python3.10/site-packages/pynndescent/sparse.py

proud-p avatar Oct 14 '25 17:10 proud-p