Join GitHub today
LB-158 / LB-170: Fix listenstore code for users with special characters, add tests and upgrade influx #199
So I spent the day looking through the influxdb-python source code. And the reason this was so hard to debug is a combination of random weird behaviour in influx with backslashes and some problems in our code.
Influxdb-python automatically escapes measurement names when we use write_points which can be seen here, so when we send a measurement with name
So, I have changed the code so that it does this and added a bunch of comments explaining stuff as best I could. I expect more changes will be requested to make it clearer. Also, I have upgraded to influx 1.2.4 and influxdb-python 4.1.0 .
Also, there is some weird behaviour when we backslash quotes in influx. Influx SOMETIMES totally ignores backslashes present in measurement names, if they come before quotes. This behaviour is present in influx itself (not influxdb-python) and I am not sure if this is a bug or if I am misunderstanding something. For example:
Backslash away from quotes:
Backslash in front of a quote gets ignored
Stuff like this is hard to write code for, unless there is something that I am missing completely...