×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

PyINDI INumberPropertyview Indexing Change

  • Posts: 15
  • Thank you received: 1
Hi all,

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

Any help would be greatly appreciated!

 
3 years 4 months ago #71048

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 1

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.

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 1
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.
3 years 3 months ago #71927

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 3
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.
The following user(s) said Thank You: Thomas
3 years 3 months ago #72448

Please Log in or Create an account to join the conversation.

Time to create page: 0.882 seconds