Closed pmeye closed 8 months ago
Hello @pmeye ,
The first issue I see is that get_connections_by_id
returns a list of strings but you treat it as a single string. The reason is that in NetworkManager connections can have the same id. The get_connections_by_id
is not actually a part of NetworkManager D-Bus API but a helper method defined in sdbus-networkmanager.
I would recommend running a type checker like mypy. It will instantly tell you what the problem is:
pmeye_example.py:13: error: Argument 1 to "NetworkConnectionSettings" has incompatible type "list[str]"; expected "str" [arg-type]
Found 1 error in 1 file (checked 1 source file)
Embarassingly simple, thanks a lot and thanks for the recommendation! My Python tooling seems to need some work.
I'm trying to follow the example for changing connections, but when I run this code I get the error below:
Error message:
I'm a big noob and struggling to figure it out myself, any help would be greatly appreciated.