I recently did a fresh installation of Ubuntu 18.04 and installed the latest versions of all INDI/PyINDI. I noticed some of the scripts I've written using PyINDI are no longer working.
For context I'm using a Davis Vantage Pro2 and am trying to access the weather parameters.
Here is a
PasteBin Link
to my script. At line 71 it throws the following error.
TypeError: 'INumberPropertyview' object does not support indexing
Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.
For the sake of completeness and in case anyone else is experiencing this issue I will present the two workarounds I found.
Firstly, INDI comes packaged with a couple
command line options
that will allow one to see and set various parameters. The output of indi_getprop is easily parsed for automated data collection.
Additionally, INDI also supports the use of
D-BUS
. The linked tutorial is a tad out of date but is still applicable to Python 3. Though, I did find I did not need to initialize gobject or use dbus.glib, which is now a depreciated module.
Personally, I will be sticking to D-BUS for now as it also allows for interactions with Ekos, such as triggering auto-focus.
I opened a PR which should fix this: github.com/geehalel/pyindi-client/pull/14Support INDI::PropertyView as a replacement of concrete structs. I
think that we need to move to using the accessor methods insted of
directly touching the underlying fields. This would be a bigger
change, so it might call for a bump to version 0.3.0.I've also added an updated vega.py, from the tutorial, as a good way
to better exercise the API.