Open simohn opened 1 year ago
Hello. Sure we can add this. Can you post the error message you are getting so I know exactly what string to compare against? It shoud be something like:
The Wifi driver parses CLI responses and only supports en_US where your language is {language}
Although now that I'm reading about what C.UTF-8 actually is I am worried that it is not going to work. If the CLI responses are different in any way than en-US, it is very likely to break the parsing.
Anyway when you send me the error string, I will make a branch that accepts it but I'll leave it up to you to test.
Reading further it sounds like I should in fact be setting the language to C and parsing that instead of us-EN. If that's the case we can leave this open as a feature request but I have no idea when I'll get to that.
Hello. Sure we can add this. Can you post the error message you are getting so I know exactly what string to compare against? It shoud be something like:
The Wifi driver parses CLI responses and only supports en_US where your language is {language}
Hello. Yes, here it is:
Traceback (most recent call last):
File "/snap/cam-controller/x7/bin/cam-controller", line 8, in
Although now that I'm reading about what C.UTF-8 actually is I am worried that it is not going to work. If the CLI responses are different in any way than en-US, it is very likely to break the parsing.
Anyway when you send me the error string, I will make a branch that accepts it but I'll leave it up to you to test.
Reading further it sounds like I should in fact be setting the language to C and parsing that instead of us-EN. If that's the case we can leave this open as a feature request but I have no idea when I'll get to that.
Ok, I understand. Yes, that sounds also reasonable for me. Hmm. I think I will stay by an older version then and switch to the new release, in case you are going to change it. Thank you.
Is it possible to access the documentation of an older version? On https://gopro.github.io/OpenGoPro/python_sdk/index.html I only get to the latest.
You can fix this temporarily with this:
import os
os.environ["LANG"] = "en_US"`
What kind of CLI-Calls are parsed and where? WifiController? To be honest changing/reinstalling the OS during development is a bit frustrating.
""
Install language" is only set during the Out of Box Experience (OOBE) and then never changes. If the system language is changed, this function returns an incorrect value.
" - https://learn.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getsystemdefaultuilanguage
If its okay I can try to add Windows with locale de_DE. Maybe some Linux Controller with de_DE too. Document the process to make it others easier to add their locals.
Sure go for it! Please make a pull request here when its reqdy.
Also, I will at some point refactor this to make it easier to add other languages.
Should I edit it in the file or is it okay if I split it up into OS adapter files like:
run in temrianl export LANG=en_US.UTF-8
Problem I would like to use the latest version of the Python SDK on Ubuntu Core. The problem is, that the library requires en_US.UTF-8 as locale, but on Ubuntu Core the locale is C.UTF-8 and unfortunately it's not editable. The language check was introduced in version 0.13.0. https://gopro.github.io/OpenGoPro/python_sdk/changelog.html
Describe the solution you'd like Can you add C.UTF-8 support?