-
Notifications
You must be signed in to change notification settings - Fork 32
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
[Bug]: Unable to load nwb extensions in compiled MATLAB app. #564
Comments
May be worth noting that I've replicated the issue on MacOS as well. All three errors mentioned pop on both systems. |
Pinging @lawrence-mbf @RR-N It looks like when running the compiled app, the path to the extension might get messed up. What is the directory that you are running the compiled app from? Is it |
The compiled app is run from |
This probably has to do with the |
Within the mcr folder in |
@RR-N It looks like by default (if you add the directory to "Files required for your application to run"), the working directory from I wonder if you should use that instead of the |
@RR-N Ah, I think I know the issue actually. I do not believe the compiled mcr can actually |
Also, the ".m" files are in fact p-coded so the mcr simply does not run ".m" source code and complains that it is "inaccessible". I was also wrong on the MatNWB is heavily reliant on generated static MATLAB source files. Modifying the code to support this would be essentially rewriting the entire project. |
Pre-generating and adding an external reference to the extension within an |
If that is causing problems, you can just remove |
Just curious since this seems strange. The repo does not have empty files in the root tutorials folder... Were the tutorial files modified or run and then generated empty files? |
No, I didn't touch any of them prior to compilation. |
This is now fixed in #609 |
I did some debugging on the following error:
This was related to the I updated the live script (#610) and added a couple of code blocks (the live script happened to contain a few MATLAB expressions) and after that the compiler was happy. @RR-N I hope the linked PR will solve the problems you encountered when compiling the app. I am closing this issue now, but feel free to re-open it if you run into more issues or have follow-up questions. |
What happened?
I've implemented support for NWB files to a MATLAB application I'm developing. My code works fine, but when I try to load any NWB file after compiling the application, I get an error stating that the extension the NWB file in question relies upon (in this case ndx_multichannel_volume, which adds support for C. Elegans microscopy data) is inaccessible:
These are my compilation settings:
This seems to happen the moment any nwbRead() call that relies on an extension occurs, regardless of whether I include matnwb by passing it as a support package to mcc or by including it in the application path from the get-go.
It may also be worth noting that compilation also triggers two errors when this is first attempted:
I couldn't find any recommended notes on how to include matnwb as a support package in a compiled Matlab app in the documentation, so if there's something I'm missing, please let me know.
Steps to Reproduce
Error Message
No response
Operating System
Windows
Matlab Version
Code of Conduct
The text was updated successfully, but these errors were encountered: