-
Notifications
You must be signed in to change notification settings - Fork 162
argument 'milliseconds' has unexpected type 'float' #119
Comments
I've discovered that the GUI works if I use a Python 3.9 venv, so it looks like it's an issue with the code not working in Python 3.10. |
self._Timer.Start(milliseconds=BALANCE_UPDATE_MIN*60*1e3) Shouldn't it be multiplied by |
I'll check if changing that fixes it. I would be annoyed because I just released an entire new AUR package based around keeping it at 3.9, and this fix would revoke that package's need for existence, plus I would need to bump the main one's pkgrel again, but I digress. It's always good to find fixes. |
I just patched out a whole bunch of floats that should be ints. This guy sure is into ending numbers with
|
Honestly there might be quite a lot of these. I'm not an avid python coder but AFAIU there was a significant change in how type hints are treated, i.e. they were more or less ignored in 3.9 and only used by static analyzers, now 3.10 throws a |
I'd really like to find that method to ignore them, this is getting to be a nightmare with patching so much that it's almost a new program, and some things that I'm not smart enough to patch (new to python). |
Sadly the only two ways I found (mentioned in PEP 484 and 526) are:
Neither is convenient. Sorry I can't be of more help. I remember someone telling me there is a way to make Python ignore those in whole source or at least per file but IDK how or where to find it. |
No worries, thank you for your help. I guess my hacky 3.9 venv method will have to do until I, you, or someone else finds more info about this. |
According to wx.SpinCtrl.SetValue() documentation it accepts 1 argument of 2 possible types:
For this argument to be int the value of self._Threshold.SetValue(int(self._Settings['switching']['threshold']*100)) (sorry I don't just do it myself but I'm on a phone on a week long mountain trip) |
Thank you, that was the final patch I needed! Pushing the changes to the AUR, and making a PR on this repo, though it's unlikely to get accepted. Actually, about that, I saw an interesting message by @YoRyan himself in one of the more popular forks talking about potentially transferring control of this repo or making that fork official. I hope you have a good time on your mountain trip! |
I'm on Arch. The daemon works fine but if I try to run
nuxhash-gui
I get this error:After the error, the program quits. It then starts again, shows the error, then quits, and repeat. This makes it hard to kill the program since the PID is always going up, so I had to resort to a reboot to stop this. It seems like others are also having this error.
The text was updated successfully, but these errors were encountered: