Skip to content
This repository was archived by the owner on Jan 1, 2020. It is now read-only.
This repository was archived by the owner on Jan 1, 2020. It is now read-only.

Using API via matlab_bridge #28

@martinholub

Description

@martinholub

Hello,

Despite several trials, my installation of matlab-bridge-api wasn't successful. Main points:

  • Python API seems to be running smoothly ("./test_all.sh" and for example f = nwb_file.open(**settings) run)

  • The issue appears to be in h5py installation. I have tried both, installing h5py beforehand (via conda from conda-forge and anaconda and via pip, I have also tried multiple versions) and let the nwb setup.py installer do the job. The later fails, whereas the the former passes successfully but results in failure when calling the module from matlab. (I have done setenv('HDF5_DISABLE_VERSION_CHECK', '1'))

Some reproducible error messages:

  1. >> nwbModule = py.importlib.import_module('nwb.h5gate')
    Error using _objects>init h5py._objects
    (D:\Build\h5py\h5py-2.7.0\h5py_objects.c:7748) (line 1)
    Python Error: ImportError: DLL load failed: The specified procedure
    could not be found.
    Error in _objects>init h5py.h5r
    (D:\Build\h5py\h5py-2.7.0\h5py\h5r.c:3222) (line 12)
    Error in h5r>init h5py._conv
    (D:\Build\h5py\h5py-2.7.0\h5py_conv.c:7536) (line 21)
    Error in init> (line 34)
    from ._conv import register_converters as _register_converters
    Error in find_links> (line 6)
    Error in h5gate> (line 17)
    Error in init>import_module (line 37)
    import(name)

  2. >> run_all_tests
    pyversion is;
    version: '2.7'
    executable: 'C:\Users\Martin\Anaconda3\envs\nwb-edit\python.exe'
    library: 'C:\Users\Martin\Anaconda3\envs\nwb-edit\python27.dll'
    home: 'C:\Users\Martin\Anaconda3\envs\nwb-edit'
    isloaded: 1
    Undefined variable "py" or class "py.nwb.h5gate.File".
    Error in h5g8.file (line 23)
    obj.fg_file = py.nwb.h5gate.File(file_name, kwargs);
    Error in nwb_file (line 52)
    f = h5g8.file(file_name, spec_files, arg_vals.default_ns, options);
    Error in t_annotation/create_annotation_series (line 36)
    f = nwb_file(settings{:});
    Error in t_annotation/test_annotation_series (line 19)
    create_annotation_series(fname, name, 'acquisition/timeseries');
    Error in t_annotation (line 78)
    test_annotation_series()
    Error in run_all_tests (line 37)
    feval(name, verbosity);

  3. Previous two cases were with python 2.7, whereas on python 3.6 the matlab crashes with system error:
    Abnormal termination:
    Access violation
    Register State (from fault):
    [...]
    Stack Trace (from fault):
    [ 0] 0x0000000000000000 +00000000
    [ 1] 0x00007ffd51cd52a9 C:\Users\Martin\Anaconda3\lib\site-packages\h5py_conv.cp36-win_amd64.pyd+00021161 PyInit__conv+00006969
    [ 2] 0x00007ffd51cd5219 C:\Users\Martin\Anaconda3\lib\site-packages\h5py_conv.cp36-win_amd64.pyd+00021017 PyInit__conv+00006825
    [ 3-126] .....
    [127] 0x000000000844a4cc C:\Program Files\MATLAB\R2016b\bin\win64\m_parser.dll+00042188 mps_count_formal_outputs+00002196

  4. And when trying to install fresh h5py with python setup.py install from the nwb_api-python folder I get:
    c:\users\martin\appdata\local\temp\easy_install-g72ay1\h5py-2.7.0\h5py\api_compa
    t.h(27) : fatal error C1083: Cannot open include file: 'hdf5.h': No such file or directory
    error: Setup script exited with error: command 'C:\Users\Martin\AppData\Loca
    l\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.e
    xe' failed with exit status 2

I will be grateful for tips how to solve the problem. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions