cbrnr/mnelab

Runtime breaks with pyside6 v6.4.0

Closed this issue · 10 comments

Installing and running MNELAB in a new environment raises TypeError: int() argument must be a string, a bytes-like object or a number, not 'KeyboardModifier' (see matplotlib/matplotlib#24155 for more information).
I think a reasonable solution until this is resolved in pyside is to limit the required version for mnelab.

cbrnr commented

Thanks for reporting this issue – I haven't tested it with PySide 6.4.0 myself!

Ideally, MNELAB should be adapted so that it also works with the new enum system. They supposedly have a "forgiveness mode", which should allow to run old code (but apparently it doesn't). I'd like to find out where the error occurs, maybe it can be fixed without too many changes. If not, limiting the version to <6.4.0 is definitely a good quick fix.

Please give me a little time to explore this (and/or feel free to comment if you have already investigated).

cbrnr commented

OK, this is actually a Matplotlib issue, which has already been fixed (matplotlib/matplotlib#24158). I tested with the latest nightly, and MNELAB starts just fine (no changes required).

Now I'm wondering if we should wait for the next Matplotlib release (v3.6.2 due October 20, which is in two days) or merge #363 in the meantime (which would also require a new release to be useful). WDYT?

What do you think about excluding matplotlib v3.6.1 (matplotlib>=3.5.0,!=3.6.1)?

cbrnr commented

This doesn't work, because they don't put a restriction on PySide. So as long as PySide 6.4.0 is installed, we will need matplotlib>=3.6.2, which hopefully will be out very soon. I was just wondering if we should release a hotfix in the meantime.

Ah, I see, my bad. Not sure why I thought PySide's issue is particular to that version.
According to PyPIStats, a couple of days shouldn't amount to too many broken installs (ref), so while merging and publishing would be ideal, waiting definitely doesn't seem unreasonable.

I'll just add, in case any of those few lucky broken installations ends up here:

  1. Congratulations!
  2. Using pip install pyside6~=6.3.0 should resolve the issue until matplotlib v3.6.2 is released.
cbrnr commented

Thanks @ZviBaratz! If it's not out in a few days, I'll make a hotfix release!

Edit: Good news, the Matplotlib devs said on Gitter that they are going to make the release this week!

cbrnr commented

@ZviBaratz Matplotlib 3.6.2 is out, can you test if this issue is fixed?

Yes, updating Matplotlib to 3.6.2 resolves the issue for me. Thank you.

cbrnr commented

Thanks @ZviBaratz, I'm glad it is working again!