You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, thanks for the previous package and this shiny new one.
I'm trying to replace my current setup with this and just going thru seeing how well it works with my setup before I delete stuff. I've noticed a few bugs so I've submitted PRs for them (#1, #2, #3)
I'm getting this error:
➜ SPEEDTEST_CONFIG=config.ini python3 speedmon.py
2021-10-04 20:05:37,884 - config_manager:__init__:19 - INFO: Loading config from config.ini
2021-10-04 20:05:37,884 - config_manager:__init__:27 - INFO: Configuration Successfully Loaded
2021-10-04 20:05:37,888 - storage_handler_base:__init__:18 - INFO: Built storage handler influx
2021-10-04 20:05:37,889 - storage_builder:init_storage_handler_from_ini:65 - INFO: No config section defined for INFLUXV2 in INI
2021-10-04 20:05:37,889 - storage_builder:init_storage_handler_from_ini:65 - INFO: No config section defined for GRAPHITE in INI
2021-10-04 20:05:37,889 - influxv1_storage_handler:validate_connection:37 - DEBUG: Testing connection to InfluxDb using provided credentials
2021-10-04 20:05:37,898 - influxv1_storage_handler:validate_connection:39 - DEBUG: Successful connection to InfluxDb
2021-10-04 20:05:37,899 - utils:run_speed_test:65 - DEBUG: Running with args: speedtest -f json
27368096 1949397 2.421 36.593 None
2021-10-04 20:06:03,296 - influxv1_storage_handler:save_results:71 - ERROR: Failed To Write To InfluxDB
Traceback (most recent call last):
File "/home/jack/Personal/speedmon/speedmon/storage/influxv1/influxv1_storage_handler.py", line 61, in save_results
self.client.write_points(self.format_results(data))
File "/home/jack/.local/lib/python3.6/site-packages/influxdb/client.py", line 608, in write_points
consistency=consistency)
File "/home/jack/.local/lib/python3.6/site-packages/influxdb/client.py", line 685, in _write_points
protocol=protocol
File "/home/jack/.local/lib/python3.6/site-packages/influxdb/client.py", line 419, in write
headers=headers
File "/home/jack/.local/lib/python3.6/site-packages/influxdb/client.py", line 378, in request
raise InfluxDBClientError(err_msg, response.status_code)
influxdb.exceptions.InfluxDBClientError: 400: {"error":"partial write: field type conflict: input field \"download\" on measurement \"speed_test_results\" is type integer, already exists as type float dropped=1"}
I fixed the error by changing format_influxdb_results like so:
.....and I think I've just answered my own issue - I got this because the database name wasn't being loaded correctly (see #3), therefore it was trying to push data into the database for the old script, which for whatever reason is storing as floats.
Do you think it is worth converting all necessary datatypes to floats for backwards compatability or is there a way I can "un-float" my existing data so I don't lose it?
@jack828 I just converted it to use floats to remain consistent. This will break and new data written by the tool but I think it ultimately needed to be done before this repo picks up steam and gets more usage.
Hey, thanks for the previous package and this shiny new one.
I'm trying to replace my current setup with this and just going thru seeing how well it works with my setup before I delete stuff. I've noticed a few bugs so I've submitted PRs for them (#1, #2, #3)
I'm getting this error:
I fixed the error by changing
format_influxdb_results
like so:But I am not a python programmer so I am not sure why that fixes it to be honest...
config file:
Using InfluxDB v1.8.0 & python 3.6.9. Clean database freshly created with
create database speedtest2
.Let me know if you need more info.
The text was updated successfully, but these errors were encountered: