From 3b0d65894a76ad44b73b5d5d5e79afb37e6cfb9d Mon Sep 17 00:00:00 2001 From: Bugazelle Date: Wed, 7 Oct 2020 21:25:15 +0800 Subject: [PATCH 1/2] [Fix] Fix the issue raised by 7yl4r --- src/ExportCsvToInflux/csv_object.py | 2 ++ src/ExportCsvToInflux/exporter_object.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ExportCsvToInflux/csv_object.py b/src/ExportCsvToInflux/csv_object.py index 2ea5ae6..f4551b3 100755 --- a/src/ExportCsvToInflux/csv_object.py +++ b/src/ExportCsvToInflux/csv_object.py @@ -193,6 +193,8 @@ def convert_csv_data_to_int_float(self, file_name=None, csv_reader=None): len_value = len(value) # Continue If Value Empty if len_value == 0: + int_type[key].append(False) + float_type[key].append(False) continue # Valid Int Type try: diff --git a/src/ExportCsvToInflux/exporter_object.py b/src/ExportCsvToInflux/exporter_object.py index 7927edc..d494dae 100755 --- a/src/ExportCsvToInflux/exporter_object.py +++ b/src/ExportCsvToInflux/exporter_object.py @@ -47,12 +47,12 @@ def __process_tags_fields(columns, try: v = int(v) except ValueError: - print('Warning: Failed to force "{0}" to float, skip...'.format(v)) + print('Warning: Failed to force "{0}" to int, skip...'.format(v)) if force_float_columns and column in force_float_columns: try: v = float(v) except ValueError: - print('Warning: Failed to force "{0}" to int, skip...'.format(v)) + print('Warning: Failed to force "{0}" to float, skip...'.format(v)) # If field is empty if len(str(v)) == 0: From 85cb3d28deaef6386c9f9c20080c52c11f760d65 Mon Sep 17 00:00:00 2001 From: Bugazelle Date: Wed, 7 Oct 2020 21:41:36 +0800 Subject: [PATCH 2/2] [Release] Release to 0.1.25 --- src/ExportCsvToInflux/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ExportCsvToInflux/__version__.py b/src/ExportCsvToInflux/__version__.py index cdf16bc..a96d65a 100644 --- a/src/ExportCsvToInflux/__version__.py +++ b/src/ExportCsvToInflux/__version__.py @@ -1 +1 @@ -__version__ = '0.1.24' +__version__ = '0.1.25'