I have encountered various frustrating errors when i need to "reboot"
micromanager. To explain a bit i am using micromanager's python API for my
acquisitions at the moment but i do all my "setup" using the GUI. So things
go like this :
2)Setup Acquisition parameters and find Positions
4)Launch my custom script using the same configuration.
Unfortunately i have witnessed some errors upon trying to launch the 4th
step. These errors don't always appear but seem to be more and more
frequent. Needless to say but they are very frustrating to encounter and i
can't really find an explanation as to why they occur.
File ".\core_threader.py", line 393, in <module>
#etiher False or events_list
File ".\core_threader.py", line 100,
File "C:\Users\lifeware\workspace\MMwrapper\scripting.py", line 41,
File "C:\Program Files\Micro-Manager-1.423.nightlyTEST\MMCorePy.py", line
return _MMCorePy.CMMCore_loadSystemConfiguration(self, *args)
MMCorePy.CMMError: Line 85:
Error in device "Scope": (Error message unavailable) (10012)" /
in order to resolve the error i can :
1) brute force it by relaunching as many times as it takes to work which it
2) reboot the microscope
Have you taken a look at the CoreLogs to see whether there is more information there? On Windows, these are usually stored in C:\Program Files\Micro-Manager\CoreLogs (change the first part to point to your MM folder).
You can also make the logging more verbose for debugging. In the GUI, you would navigate to Tools > Options... and then check "Enable debug logging". I'm not sure how you would enable debug logging via the Python API, but there is likely a method to do so.
Write back if you find anything more descriptive about your error.
Since the error occurs during serial port communications, I would focus my debugging efforts around this part. I am by no means an expert on this topic, so these suggestions might be a bit naive (maybe someone else could help):
- Check that the baud rate and terminating characters are set correctly for the microscope's device adapter in Micro-Manager's hardware configuration wizard - Check that the baud rate is set correctly in the Windows device manager (I don't think this really matters, but it's worth a shot) - Try a different USB port - Try sending the same serial commands to the microscope via another program, such as the Arduinio IDE's serial port console. If you can reproduce the bug, then the problem is likely to be isolated to serial communications with the scope. - Try using a port sniffer to monitor the messages being sent over the COM port and verify that they match the microscope's serial port API
I hope that one of these suggestions points you in the right direction, or that someone else can chime in with suggestions.
i'll be trying to debug this error, the issue is that its pretty
inconsistent as in sometimes it'll happen, other times it wont with it being
very frequent lately. Anyway ill see if i can solve the issue!