nanophotonics / nplab

Core functions and instrument scripts for the Nanophotonics lab experimental scripts
GNU General Public License v3.0
38 stars 15 forks source link

PyQt overloaded signals #95

Closed YagoDel closed 4 years ago

YagoDel commented 4 years ago

I'm getting a KeyError: 'there is no matching overloaded signal' in this line of StageUI, when running in Python2, both PyQt4 and PyQt5

Following this, it works if I change step_size_select.activated[str].connect(partial(self.on_activated, i)) to step_size_select.activated[unicode].connect(partial(self.on_activated, i)), but then this fails in Python 3

I don't understand this issue, since clearly people are using this code in Python 2. Can anyone reproduce this KeyError? I'm using qtpy as the PyQt wrapper.

eoinell commented 4 years ago

I've asked around, and I'm not sure that people here use the stage UI. Most just use CWL, or the joystick in each lab.

YagoDel commented 4 years ago

😂 🤦‍♂ Had a look through usages of Stage, and found the following classes that use the StageUI, as well as current people that have used/modified them (semi-)recently:

eoinell commented 4 years ago

Demelza doesn't, Ilya does, but isn't sure whether he inherits from stage UI

imanyakin commented 4 years ago

Ah, I didn't realize it's this one - I haven't used this in a long time and don't intend to.

I actually use the pi_stage.py currently, but I intend to rewrite it into something different when I start using it properly.

YagoDel commented 4 years ago

Since people aren't currently using it, and it works fine in Python 3, we will not provide Python 2 compatibility for this