Error in Multi-D Acquisition while connected to Matlab

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in Multi-D Acquisition while connected to Matlab

yiftachd
Hi,

I'm using matlab (2019a) in order to interface the GUI of Micro-Manager
(1.4.23 20190515) while running a GUI of my own in parallel to operate other
instruments. Everything works just fine, but I'm getting the following error
when I try to acquire images using Multi-D acquisition in the MM GUI:

"JSONArray initial value should be a string or collection or array"

Do I need to initialize something in my code before I press "Acquire!" in
the multi-D acquisition window?

Thanks in advance,
Yiftach



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Error in Multi-D Acquisition while connected to Matlab

Stuurman, Nico
Hi Yiftach,
> I'm using matlab (2019a) in order to interface the GUI of Micro-Manager
> (1.4.23 20190515) while running a GUI of my own in parallel to operate other
> instruments. Everything works just fine, but I'm getting the following error
> when I try to acquire images using Multi-D acquisition in the MM GUI:
>
> "JSONArray initial value should be a string or collection or array"
>
> Do I need to initialize something in my code before I press "Acquire!" in
> the multi-D acquisition window?

I ran into a similar issue a few days ago while playing with
Micro-Manager dependencies (the "jars" included in the
plugins/Micro-Manager directory.  My feeling is that Matlab replaces
something on the classpath that MM needs.  Could be the JSON library
itself (json.org).  Regretfully, MM includes its own copy in the source
code (i like to change that, but a bit scared it may break things).

Look for a JSON library on the classpath.

Does MM work correctly when you run it by itself?

Best,


Nico



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Error in Multi-D Acquisition while connected to Matlab

Bruno
Hi,

I have found the same problem but only on MATLAB 2018b.
When I use MATLAB 2016b I dont get the error.
And when using MM on its own it also works perfectly well.

So it seems to depend on the MATLAB version.
Do you have any ideas why this could be the case?

Best,
Bruno.



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Error in Multi-D Acquisition while connected to Matlab

xandr
This post was updated on .
Chimming in from Matlab 2018b with the same issue.

I've pasted the instances of JSON in my classpath below

$matlabroot/java/jar/connector_api/jni_json_api.jar
$matlabroot/java/jarext/jackson/jackson-jaxrs-json-provider.jar
$matlabroot/java/jarext/org.eclipse.elk.graph.json.jar

Best,
Alex

Reply | Threaded
Open this post in threaded view
|

Re: Error in Multi-D Acquisition while connected to Matlab

xandr
Scratch that, I've edited my previous post to reflect the instances of JSON
in my classpath. Hope it helps!

Best,
Alex



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Error in Multi-D Acquisition while connected to Matlab

Stuurman, Nico
On 7/24/19 11:46 AM, xandr wrote:
> Scratch that, I've edited my previous post to reflect the instances of JSON
> in my classpath. Hope it helps!

Edits may be possible on Nabble, but will not make it to the mailing
list subscribers...

jni_json_api.jar is interesting.  Can you make a copy of that file,
unzip it (jar files are actually zip files as well), and send me a
directory listing with the filenames in there? Off-list is fine, and we
can summarize here later. I suspect a name clash with the org.json code
in Micro-Manager.

Regretfully, it is not straight forward to remove the org.json code from
Micro-Manager.  The MM acquisition engine uses calls to this library
that cause exceptions on newer versions.  Since the acquisition engine
is written in Clojure, it is very difficult to change (unless there are
Clojure coders out there who volunteer to help!).  If we can make the
acquisition engine work with newer versions of the json library, then it
will be straight forward to take it out and use the Matlab json code
instead (if my suspicion is correct that there is a name clash with
jni_json_api).

Best,

Nico





_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Error in Multi-D Acquisition while connected to Matlab

Bruno
Hi everyone,

Im still having the same error. Did anyone manage to solve it? Is then
MicroManager Multiacq not compatible wiith newer MATLAB versions?

Best,
Bruno.



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general