500 deque mutated during iteration error

I’m encountering a “500 deque mutated during iteration” error while using the OpenFlexure Microscope software. This issue appears when attempting to use the live preview or other functionalities.

Steps Taken to Troubleshoot:

  1. Restarted the OpenFlexure software and Raspberry Pi.

  2. Stopped the firewall to rule out network-related issues.

  3. Verified that the camera is working (captured images appear in the gallery).

  4. Checked logs but didn’t find additional information beyond the “500 deque mutated during iteration” message.

  5. Tried accessing the microscope from different devices and browsers.

Additional Observations:

The camera captures images successfully, but the live preview does not work.

The issue persists even after multiple restarts.

Is this an issue that has started on a microscope that was working before? Or is it a new microscope that you have not been able to see a live preview on at all?

Are you using the full desktop version of the OpenFlexure operating system, or the ‘lite’ version? If you have the full desktop version, does this also happen if you use the microscope in a standalone mode, with keyboard mouse and screen?

it was fully working before , im using the full version, i didn’t tried on standalone

If it was working before, then it is most likely to be either a loose connection (have you had anything apart to upgrade or modify), or a glitch on the SD card.

The SD card for the operating system is a weak point for the Pi. If the Pi is not shut down properly it can corrupt the SD card. The cards themselves are often not designed for the multiple read/write that they get from the operating system. Filling a card with photos can also cause big problems as the operating system is then not able to do its things. That is all on top of any possible software issues that might have corrupted settings somewhere. Strange behaviour in the OpenFlexure software is often cured by re-installing the SD card from scratch, or using a new card. Copy any data that you need off the card first.

thank you for your kind assistance, so what is the best practice here to overcome the SD card issues can i add external hard drive or something?

First see whether that is actually the problem, does it all work if you reinstall, or use a different card?

It is a good idea to use an external drive if you are storing a lot of images from the microscope. There are short USB sticks that only stick out of the port far enough to be able to take them out, so are less likely to be knocked out by mistake.

So i did what you suggest i reinstalled the os completely on the SD card but unfortunately still the same issue is present

Hmm. @JohemianKnapsody any ideas?

I lowered camera bitrate and camera FPS from the setting and it seems to worked for now !

1 Like

Hi, can I check what objective you were using? And do you have any captured images of your sample you can share?

If the sample is too dense, it might be that you haven’t finished downloading one frame before the next one comes in. Lowering either of the camera settings or using a higher power objective generally fixes it

1 Like