micro-manager / pycro-manager

Python control of micro-manager for customized data acquisition
https://pycro-manager.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
165 stars 52 forks source link

Magellan class does not initialize #739

Closed mdanderson03 closed 7 months ago

mdanderson03 commented 9 months ago

I have been unable to initialize the Magellan class from pycromanager with recent versions of micromanager. Not certain on when it changed, but some time between 9-29-2023 and 10-30-2023. In the screen shots below, I have pycromanager version 0.29.9 and am running various versions of micromanager in demo configuration.

9-29-2023 micromanager version

image

10-30-2023 micromanager version

image

2-06-2024 micromanager version

image

JonesLab-TAMU commented 8 months ago

Any update on this? We're getting the same issue.

henrypinkard commented 8 months ago

@nicost it appears you may have changed the API in https://github.com/micro-manager/micro-manager/pull/1832, which has broken Magellan access through pycro-manager

Could you look into this? Or if you don't have time and aren't using the changes you made, perhaps revert that PR?

nicost commented 8 months ago

Do you have the studio object available in Pycromanager? If so, can you call

magellan - Magellan(studio)

?

henrypinkard commented 8 months ago

@nicost, I appreciate your quick response. I attempted the following approach:

from pycromanager import Magellan, Studio

s = Studio()
magellan = Magellan(s)

but unfortunately, it didn't resolve the issue. I don't understand why--it may be related to the inheritance structure of the Studio and limitations of the Java python bridge.

While I understand the changes in micro-manager/micro-manager#1832 were necessary, they've resulted in a breaking API change that currently leaves Magellan unusable from Python. Considering your previous focus on avoiding such disruptions, I'm hopeful you see the need for a resolution. I lack both a comprehensive understanding of the alterations made in that PR and the equipment to conduct proper testing. Could you please investigate a solution?

nicost commented 8 months ago

I'll dive into this, but it may take some time. First thought is to take studio out of the constructor, create a function that adds it in, then test everywhere it is used to make sure that it is not null.

On Mon, Apr 1, 2024 at 3:56 PM Henry Pinkard @.***> wrote:

@nicost https://github.com/nicost, I appreciate your quick response. I attempted the following approach:

from pycromanager import Magellan, Studio s = Studio()magellan = Magellan(s)

but unfortunately, it didn't resolve the issue. I don't understand why--it may be related to the inheritance structure of the Studio and limitations of the Java python bridge.

While I understand the changes in micro-manager/micro-manager#1832 https://github.com/micro-manager/micro-manager/pull/1832 were necessary, they've resulted in a breaking API change that currently leaves Magellan unusable from Python. Considering your previous focus on avoiding such disruptions, I'm hopeful you see the need for a resolution. I lack both a comprehensive understanding of the alterations made in that PR and the equipment to conduct proper testing. Could you please investigate a solution?

— Reply to this email directly, view it on GitHub https://github.com/micro-manager/pycro-manager/issues/739#issuecomment-2030724947, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQN2K257E7PSHAMBSKQD2LY3HQ2ZAVCNFSM6AAAAABC72NQJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZQG4ZDIOJUG4 . You are receiving this because you were mentioned.Message ID: @.***>

nicost commented 8 months ago

and sorry about the disruption, I clearly had forgotten about the use of Micro-Magellan outside of the MMStudio eco-system.

On Tue, Apr 2, 2024 at 11:37 AM Nico Stuurman @.***> wrote:

I'll dive into this, but it may take some time. First thought is to take studio out of the constructor, create a function that adds it in, then test everywhere it is used to make sure that it is not null.

On Mon, Apr 1, 2024 at 3:56 PM Henry Pinkard @.***> wrote:

@nicost https://github.com/nicost, I appreciate your quick response. I attempted the following approach:

from pycromanager import Magellan, Studio s = Studio()magellan = Magellan(s)

but unfortunately, it didn't resolve the issue. I don't understand why--it may be related to the inheritance structure of the Studio and limitations of the Java python bridge.

While I understand the changes in micro-manager/micro-manager#1832 https://github.com/micro-manager/micro-manager/pull/1832 were necessary, they've resulted in a breaking API change that currently leaves Magellan unusable from Python. Considering your previous focus on avoiding such disruptions, I'm hopeful you see the need for a resolution. I lack both a comprehensive understanding of the alterations made in that PR and the equipment to conduct proper testing. Could you please investigate a solution?

— Reply to this email directly, view it on GitHub https://github.com/micro-manager/pycro-manager/issues/739#issuecomment-2030724947, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQN2K257E7PSHAMBSKQD2LY3HQ2ZAVCNFSM6AAAAABC72NQJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZQG4ZDIOJUG4 . You are receiving this because you were mentioned.Message ID: @.***>

henrypinkard commented 8 months ago

No worries, thanks!

henrypinkard commented 7 months ago

should be fixed in https://github.com/micro-manager/micro-manager/pull/1914

jrtage commented 7 months ago

I'm running the 20240426 nightly build downloaded from the website and I am getting this error. did the issue return since fixing it?

henrypinkard commented 6 months ago

This would be surprising. I suspect you may have an old version of a library hanging around. Can you try deleting your MM installation and performing a fresh new install of latest version?