nel-lab / mesmerize-core

High level pandas-based API for batch analysis of Calcium Imaging data using CaImAn
Other
58 stars 15 forks source link

NotImplementedError: cannot instantiate 'PosixPath' on your system #255

Closed qweasdf1354 closed 9 months ago

qweasdf1354 commented 9 months ago

Hi, author! because the windows may encounter some unexpected condition I try the Ubuntu to run the mescore. it quite well but when I use the viz, it not show the picture (I mean following your code, I install the WGPU, and i can run the viz.show without error, however, the interface which shows the tiff images are grey. it seems loading, but it remain grey for a long time more than 10 minutes which may be 1 minutes in windows) So I try to run the mcorr and cnmf in the ubuntu and try to see the results in the windows. however when I run the


# to load existing batches use `load_batch()`
df = mc.load_batch(batch_path) 

the error occur


---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Cell In[8], line 5
      1 # create a new batch
      2 # df = mc.create_batch(batch_path)
      3 
      4 # to load existing batches use `load_batch()`
----> 5 df = mc.load_batch(batch_path)

File ~\miniforge3\envs\mescore\lib\site-packages\mesmerize_core\batch_utils.py:180, in load_batch(path)
    152 """
    153 Load the batch dataframe pickle file
    154 
   (...)
    175 
    176 """
    178 path = validate_path(path)
--> 180 df = pd.read_pickle(Path(path))
    182 df.paths.set_batch_path(path)
    184 # check to see if added and ran timestamp are in df

File ~\miniforge3\envs\mescore\lib\site-packages\pandas\io\pickle.py:206, in read_pickle(filepath_or_buffer, compression, storage_options)
    203     with warnings.catch_warnings(record=True):
    204         # We want to silence any warnings about, e.g. moved modules.
    205         warnings.simplefilter("ignore", Warning)
--> 206         return pickle.load(handles.handle)
    207 except excs_to_catch:
    208     # e.g.
    209     #  "No module named 'pandas.core.sparse.series'"
    210     #  "Can't get attribute '__nat_unpickle' on <module 'pandas._libs.tslib"
    211     return pc.load(handles.handle, encoding=None)

File ~\miniforge3\envs\mescore\lib\pathlib.py:962, in Path.__new__(cls, *args, **kwargs)
    960 self = cls._from_parts(args)
    961 if not self._flavour.is_supported:
--> 962     raise NotImplementedError("cannot instantiate %r on your system"
    963                               % (cls.__name__,))
    964 return self

NotImplementedError: cannot instantiate 'PosixPath' on your system

Could you help me to solve this condition? Thanks a lot!

qweasdf1354 commented 9 months ago

Screenshot from 2023-11-18 23-53-20 It is looks like this and remain grey with no change

kushalkolar commented 9 months ago

closing since we're already looking at this in another issue

qweasdf1354 commented 9 months ago

Thanks!