HPInc / HP-Digital-Microfluidics

HP Digital Microfluidics Software Platform and Libraries
MIT License
2 stars 0 forks source link

Monitor crashes with latest version of matplotlib #227

Closed EvanKirshenbaum closed 5 months ago

EvanKirshenbaum commented 5 months ago

When doing a clean install on a new machine, pip install -r requirements.txt pulls in more recent versions of matplotlib and numpy than the 3.4.2 and 1.20.3 (respectively) that I have on my system, and the BoardMonitor crashes with this error:

image

Trying to downgrade the versions using pip results in it complaining about needing to rebuild using the latest version of Visual C++ (and I'm not sure that it even works), so I need to just figure out what's going on.

Also, they're running with Python 3.10, just in case it makes a difference.

I should test by pulling mine up to the latest versions and figuring out how to make it work.

Migrated from internal repository. Originally created by @EvanKirshenbaum on Feb 02, 2023 at 11:32 AM PST. Closed on Feb 04, 2023 at 9:03 PM PST.
EvanKirshenbaum commented 5 months ago

This issue was referenced by the following commit before migration:

EvanKirshenbaum commented 5 months ago

I installed Python 3.10. The versions I got are matplotlib: 3.6.3 and numpy: 1.24.1

And it crashes for me. Yay?

The good news is that the packages are kept per interpreter, so if I change the interpreter back to 3.9, everything works. So I'm not completely blocked on doing anything else. I just can't start using 3.10 for anything else until I get this done.

Migrated from internal repository. Originally created by @EvanKirshenbaum on Feb 04, 2023 at 4:06 PM PST.
EvanKirshenbaum commented 5 months ago

Okay, that wasn't too difficult, even if it was an atrocious way to signal the error.

It appears that it's now illegal to create a legend that has no entries, so when I said

            self.legend = self.board_monitor.figure.legend(handles=handles,
                                                           title="Reagents",
                                                           ncol=ncols
                                                           )

when handles was an empty list because there were no reagents on the board, it crashed deep in the bowels.

The solution is simply to not create the legend in that case.

Migrated from internal repository. Originally created by @EvanKirshenbaum on Feb 04, 2023 at 8:59 PM PST.