Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration not saved correctly on Windows? #587

Closed
matejkarasek opened this issue Feb 17, 2022 · 9 comments · Fixed by #603
Closed

Configuration not saved correctly on Windows? #587

matejkarasek opened this issue Feb 17, 2022 · 9 comments · Fixed by #603

Comments

@matejkarasek
Copy link

matejkarasek commented Feb 17, 2022

On Windows 11 with pip installation (2022.1), the configuration saving does not seem to work properly.

The flight control values (max thrust, max angle, ...) do not get remembered and return to default values after restart. Even if the config.json file is edited manually (in the config folder accessed through the GUI), it returns back to the default values after restart (both the settings and the values in config.json).

In native Ubuntu 20.04 this works as expected, e.g. after restart I get the last set values in the GUI.

EDIT: open tabs are saved correctly, though

@matejkarasek matejkarasek changed the title Configuration not saved correctly on Widnows? Configuration not saved correctly on Windows? Feb 17, 2022
@knmcguire
Copy link
Contributor

Hmm interesting. I can't remember this being an issue on my windows 10 but maybe I haven't looked at it carefully enough. Next week is our issue solving week so I'll plan to check this out then too!

@knmcguire
Copy link
Contributor

With the latest development version installed with pip and on windows 10, I can not replicate this problem. I've changed the max thrust from 80 to 90, closed the cfclient and reopened it again, and it was still on the 90 that I set before closing.

Also the terminal said once I closed the cfclient:

INFO:cfclient.utils.config:Config file saved to [C:\Users\kimbe\AppData\Local\Bitcraze\cfclient/config.json]

@matejkarasek was this on windows 11 as well? Does the terminal on which you started the cfclient from indicate any errors?

@matejkarasek
Copy link
Author

Thanks for looking into this...
I am on pip install 2022.1

It might be related to using a joystick. If no joystick is connected, I do get the same terminal message as you mention. However then the flight control values are greyed out so cannot change them.

When I connect a joystick, the joystick works fine, but I am constantly getting these error messages:
Traceback (most recent call last): File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\site-packages\cfclient\ui\tabs\FlightTab.py", line 554, in updateInputControl self.thrustProgress.setValue(thrust) TypeError: setValue(self, int): argument 1 has unexpected type 'float'

Then when I close cfclient, I get this in the PowerShell:

WARNING:cfclient.utils.input:Exception while reading inputdevice: Traceback (most recent call last): File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\site-packages\cfclient\utils\input\__init__.py", line 521, in read_input self.input_updated.call(data.roll + self.trim_roll, File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\site-packages\cflib\utils\callbacks.py", line 54, in call cb(*args) AttributeError: 'FlightTab' does not have a signal with the signature _input_updated_signal(double,double,double,double)

Exception in thread Thread-8:

Traceback (most recent call last): File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\site-packages\cfclient\utils\input\__init__.py", line 521, in read_input self.input_updated.call(data.roll + self.trim_roll, File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\site-packages\cflib\utils\callbacks.py", line 54, in call cb(*args) AttributeError: 'FlightTab' does not have a signal with the signature _input_updated_signal(double,double,double,double)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner self.run() File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\site-packages\cfclient\utils\periodictimer.py", line 86, in run self._callbacks.call() File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\site-packages\cflib\utils\callbacks.py", line 54, in call cb(*args) File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\site-packages\cfclient\utils\input\__init__.py", line 527, in read_input logger.warning("Exception while reading inputdevice: %s", File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\logging\__init__.py", line 1480, in warning self._log(WARNING, msg, args, **kwargs) File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\logging\__init__.py", line 1615, in _log self.handle(record) File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\logging\__init__.py", line 1625, in handle self.callHandlers(record) File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\logging\__init__.py", line 1687, in callHandlers hdlr.handle(record) File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\logging\__init__.py", line 967, in handle self.emit(record) File "C:\Users\Matej\AppData\Local\Programs\Python\Python310\lib\site-packages\cfclient\ui\tabs\LogClientTab.py", line 61, in emit self._signal.emit(formatter.format(record)) AttributeError: 'LogClientTab' does not have a signal with the signature _update(QString)

@matejkarasek
Copy link
Author

It could be I installed cfclient from (customized) source in the past, is there a way to make sure everything is wiped out before installing with pip?

@knmcguire
Copy link
Contributor

It would be not super likely but it wouldn't hurt to try to do a pip uninstall cfclient cflib and install just the cfclient again.

I'll try the controller thing that you mentioned once I'm on windows again... perhaps that is the culprit of your issues.

@matejkarasek
Copy link
Author

Thanks, was worth a shot, but it didn't help (I believe I already tried this before)
Also didn't help with #588

@knmcguire
Copy link
Contributor

ah oke at least you tried.

Not many of us have windows 11 on our machines so we just have wait a bit and see (or i have to upgrade my computer soon :))

@knmcguire
Copy link
Contributor

Now I can try this one out as well!

On windows 11, with python 3.10, I do not have this issue. The cfclient seems to save the values for the next session.

But the controller issue is quite annoying.. so perhaps we should change the title of this issue to that.

Which controller were you using @matejkarasek ? Mine was a ps3 one

@matejkarasek
Copy link
Author

I was on Python 3.10.0, tried upgrading to 3.10.4 but no change on my end, settings still not saved...
How did you install Python? What version exactly?

As for the controllers, I observe the same behavior with a PS4 gamepad (Dualshock 4, connected via USB) and with a FrSky USB dongle to which my transmitter connects...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants