Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

InfluxDBClientError when writing boolean data #235

Closed
readmodifywrite opened this issue Aug 31, 2015 · 3 comments
Closed

InfluxDBClientError when writing boolean data #235

readmodifywrite opened this issue Aug 31, 2015 · 3 comments

Comments

@readmodifywrite
Copy link

Error looks like this:

"InfluxDBClientError: 400: unable to parse 'sapphire.devices.225 enable_channel_hopping=Falsei 1440436537172820992': invalid boolean"

Note the False is encoded with 'i', as if it were an integer.

In line_protocol.py line 62, _escape_value checks if value is an integer and then appends the i. Python's boolean type is a subclass of int, so _escape_value will incorrectly append the i.

This is on Python 2.7.6.

@aviau
Copy link
Collaborator

aviau commented Aug 31, 2015

Thank you for the bug report! I'll fix that right away.

aviau added a commit that referenced this issue Aug 31, 2015
@aviau aviau closed this as completed Aug 31, 2015
@aviau
Copy link
Collaborator

aviau commented Aug 31, 2015

Fixed and released to pypi. v2.9.1

@readmodifywrite
Copy link
Author

Thanks!!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants