NASA-AMMOS / NASA-AMMOS/AIT-Core
Telemetry with array-type values can't be written to influxdb
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 56
- Forks
- 35
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 3
Description
Writing telemetry with FieldList objects to InfluxDB fails. The InfluxDB responds with a "invalid boolean" error when it receives a payload with FieldList objects. The FieldList class needs a decode function similar to the decode function in the dtype.ArrayType class which can be called when generating the data payload in the insert function within the InfluxDBBackend plugin.
Error messages in the console:

A potential fix in the InfluxDBBackend plugin would look like:
def insert(self, packet, time=None, **kwargs):
fields = {}
pd = packet._defn
for defn in pd.fields:
val = getattr(packet.raw, defn.name)
if pd.history and defn.name in pd.history:
val = getattr(packet.history, defn.name)
if val is not None and not (isinstance(val, float) and math.isnan(val)):
if isinstance(val, FieldList):
fields[defn.name] = val.decode()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the FieldList class and the decode function in ait/core/dtype.py, using the linked ArrayType implementation as a reference. Then inspect the InfluxDBBackend insert function and verify that FieldList values produce a valid InfluxDB payload without the invalid boolean error; add or run the relevant backend tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- database
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100