Skip to content

Error using Zarr.pySetup #68

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

Open
ehennestad opened this issue Apr 29, 2025 · 5 comments
Open

Error using Zarr.pySetup #68

ehennestad opened this issue Apr 29, 2025 · 5 comments

Comments

@ehennestad
Copy link

I am getting the following error in Zarr.pySetup:

Error using six>__get__
Python Error: AttributeError: 'NoneType' object has no attribute 'BaseHTTPServer'

It is triggered by the following line:

loadedModules = dictionary(sys.modules);

I have not explored which module in my environment causes this message

@jm9176
Copy link
Member

jm9176 commented Apr 29, 2025

Hi @ehennestad, could you please share the repro steps and MATLAB release (e.g. R2025a) info?

EDIT: Also share the OS info

@ehennestad
Copy link
Author

I tried to reproduce this, but getting another error:

Error using dictionary/isKey
Unable to use 'string' as key for dictionary with 'cell' key type.

Error in Zarr.pySetup (line 53)
            if ~loadedModules.isKey("ZarrPy")

Error in Zarr (line 76)
            Zarr.pySetup;

Error in zarrread (line 14)
zarrObj = Zarr(filepath);

Caused by:
    Error using cell
    Conversion to cell from string is not possible.

This is MATLAB R2023b, it works on R2025a

@abhibaruah
Copy link
Member

Hello @ehennestad
Can you share the reproduction steps along with the OS information?

@ehennestad
Copy link
Author

I get the same error if I run this in R2023b

rootFolder = fileparts( mfilename("fullpath") );
root_zarr_folder = fullfile('test.zarr', 'groupA', 'groupB');
zarrcreate(root_zarr_folder, [100,100]) 

macOS 15.4.1

@abhibaruah
Copy link
Member

In R2023b, conversion of a MATLAB dictionary to a Python dictionary is not supported. Which is why you are seeing this error.

For example, even this code fails iN R2023b but passes from R2024a onwards:

X = dictionary(["A", "B"], ["a", "b"]);
Y = py.dict(X)

I know we have mentioned that the minimum release is R2022b, but I suppose there are still a few things we need to iron out. The newer the MATLAB release, the better the support.

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

3 participants