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
Any requirement for csv file encoding ? I use the csv file generated by python dataframe.to_csv with 'utf_8_sig'. then got below errors. and the CSV file include chinese language. Many Thanks.
File "C:/WorkPlace/Python_Project/JQData/Upload_JQ_data.py", line 15, in exporter.export_csv_to_influx(csv_file="beishang_sh_change_20210201231306.csv",db_server_name="192.168.78.136:8086",db_user="admin",db_password="!234qwer",db_name="BeiShang",db_measurement="BeiShang",time_column="day",tag_columns="link_name,code,name",time_format="%Y-%m-%d",field_columns="share_number,share_ratio",batch_size=5000)
File "C:\WorkPlace\Anaconda3\envs\Python_Project\lib\site-packages\ExportCsvToInflux\exporter_object.py", line 329, in export_csv_to_influx
csv_file_length = csv_object.get_csv_lines_count(csv_file_item)
File "C:\WorkPlace\Anaconda3\envs\Python_Project\lib\site-packages\ExportCsvToInflux\csv_object.py", line 136, in get_csv_lines_count
has_header = self.get_csv_header(file_name)
File "C:\WorkPlace\Anaconda3\envs\Python_Project\lib\site-packages\ExportCsvToInflux\csv_object.py", line 34, in get_csv_header
has_header = sniffer.has_header(f.read(40960))
File "C:\WorkPlace\Anaconda3\envs\Python_Project\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 118: character maps to
The text was updated successfully, but these errors were encountered:
Any requirement for csv file encoding ? I use the csv file generated by python dataframe.to_csv with 'utf_8_sig'. then got below errors. and the CSV file include chinese language. Many Thanks.
File "C:/WorkPlace/Python_Project/JQData/Upload_JQ_data.py", line 15, in exporter.export_csv_to_influx(csv_file="beishang_sh_change_20210201231306.csv",db_server_name="192.168.78.136:8086",db_user="admin",db_password="!234qwer",db_name="BeiShang",db_measurement="BeiShang",time_column="day",tag_columns="link_name,code,name",time_format="%Y-%m-%d",field_columns="share_number,share_ratio",batch_size=5000)
File "C:\WorkPlace\Anaconda3\envs\Python_Project\lib\site-packages\ExportCsvToInflux\exporter_object.py", line 329, in export_csv_to_influx
csv_file_length = csv_object.get_csv_lines_count(csv_file_item)
File "C:\WorkPlace\Anaconda3\envs\Python_Project\lib\site-packages\ExportCsvToInflux\csv_object.py", line 136, in get_csv_lines_count
has_header = self.get_csv_header(file_name)
File "C:\WorkPlace\Anaconda3\envs\Python_Project\lib\site-packages\ExportCsvToInflux\csv_object.py", line 34, in get_csv_header
has_header = sniffer.has_header(f.read(40960))
File "C:\WorkPlace\Anaconda3\envs\Python_Project\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 118: character maps to
The text was updated successfully, but these errors were encountered: