CSS-Electronics / api-examples

CANedge API Examples for MDF4/S3
MIT License
103 stars 35 forks source link

Value error merge float64 and datetime64[ns, UTC] #18

Closed hurbx closed 1 year ago

hurbx commented 1 year ago

when some files are in the conversion process I get the following error I have read the documentation of the library but I can't find the error

Device: 4F0BBBD2 | Log file: /LOG/958D2219/00002501/00000001-63D2969F.MF4 [Extracted 127276 decoded frames] Period: 2023-01-26 14:57:17.962700+00:00 - 2023-01-26 15:04:02.828300+00:00

Traceback (most recent call last): File "C:\Users\hugoa\OneDrive\Escritorio\Telemetria\Decoder MF4\Decoder-MF4\data-processing\process_data.py", line 52, in df_phys_join = restructure_data(df_phys=df_phys_all, res="1S", full_col_names=True) File "C:\Users\hugoa\OneDrive\Escritorio\Telemetria\Decoder MF4\Decoder-MF4\data-processing\utils.py", line 100, in restructure_data df_phys_join = pd.merge_ordered( File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 321, in merge_ordered result = _merger(left, right) File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 290, in _merger op = _OrderedMerge( File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 1623, in init _MergeOperation.init( File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 703, in init self._maybe_coerce_merge_keys() File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 1262, in _maybe_coerce_merge_keys raise ValueError(msg) ValueError: You are trying to merge on float64 and datetime64[ns, UTC] columns. If you wish to proceed you should use pd.concat

MatinF commented 1 year ago

Can you share the files and a full zip replicating the issue via wetransfer.com to us via our contact form?

hurbx commented 1 year ago

Can you share the files and a full zip replicating the issue via wetransfer.com to us via our contact form?

hi martin , yeah there's no problem hope you can help me

hurbx commented 1 year ago

iam really sorry i dont really understand what you need , can you explain me ??

files: https://we.tl/t-TODzYtcn3B

this is a log of the error

Exception in thread Thread-292: Traceback (most recent call last): File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1378, in run self.function(*self.args, **self.kwargs) File "C:\Users\hugoa\OneDrive\Escritorio\backend_ver2\applications\converter\converter_timer.py", line 9, in timer_converter x = converter.main() File "C:\Users\hugoa\OneDrive\Escritorio\backend_ver2\applications\converter\aws_converter.py", line 73, in main self.converter(devices_folder, id_bus) File "C:\Users\hugoa\OneDrive\Escritorio\backend_ver2\applications\converter\aws_converter.py", line 99, in converter df_phys_join = restructure_data(df_phys=df_phys_all, res="1S", full_col_names=True).fillna(0) File "C:\Users\hugoa\OneDrive\Escritorio\backend_ver2\applications\converter\UtilsFiles.py", line 101, in restructure_data df_phys_join = pd.merge_ordered( File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 321, in merge_ordered result = _merger(left, right) File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 290, in _merger op = _OrderedMerge( File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 1623, in init _MergeOperation.init( File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 703, in init self._maybe_coerce_merge_keys() File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 1262, in _maybe_coerce_merge_keys raise ValueError(msg) ValueError: You are trying to merge on float64 and datetime64[ns, UTC] columns. If you wish to proceed you should use pd.concat

On Fri, Jan 27, 2023 at 8:54 AM Hugo Urbina Guajardo < @.***> wrote:

here is the we transfer link too

https://we.tl/t-TODzYtcn3B

On Thu, Jan 26, 2023 at 6:32 PM Martin Falch @.***> wrote:

Can you share the files and a full zip replicating the issue via wetransfer.com to us via our contact form?Den 26. jan. 2023 kl. 17.58 skrev Hugo Urbina G @.***>: when some files are in the conversion process I get the following error I have read the documentation of the library but I can't find the error Device: 4F0BBBD2 | Log file: /LOG/958D2219/00002501/00000001-63D2969F.MF4 [Extracted 127276 decoded frames] Period: 2023-01-26 14:57:17.962700+00:00 - 2023-01-26 15:04:02.828300+00:00 Traceback (most recent call last): File "C:\Users\hugoa\OneDrive\Escritorio\Telemetria\Decoder MF4\Decoder-MF4\data-processing\process_data.py", line 52, in df_phys_join = restructure_data(df_phys=df_phys_all, res="1S", full_col_names=True) File "C:\Users\hugoa\OneDrive\Escritorio\Telemetria\Decoder MF4\Decoder-MF4\data-processing\utils.py", line 100, in restructure_data df_phys_join = pd.merge_ordered( File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 321, in merge_ordered result = _merger(left, right) File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 290, in _merger op = _OrderedMerge( File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 1623, in init _MergeOperation.init( File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 703, in init self._maybe_coerce_merge_keys() File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 1262, in _maybe_coerce_merge_keys raise ValueError(msg) ValueError: You are trying to merge on float64 and datetime64[ns, UTC] columns. If you wish to proceed you should use pd.concat

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/CSS-Electronics/api-examples/issues/18#issuecomment-1405682545, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYX67UQKSK3LOFMEH6BQ6D3WULUOJANCNFSM6AAAAAAUHXMU5I . You are receiving this because you authored the thread.Message ID: @.***>

Found a total of 1 log files C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\can_decoder\DecoderBase.py:53: MissingDataWarning: No data found for signal Signal "Pressure" 56:8 warnings.warn("No data found for signal {}".format(signal), MissingDataWarning) C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\can_decoder\DecoderBase.py:53: MissingDataWarning: No data found for signal Signal "PSU_Voltage" 40:8 warnings.warn("No data found for signal {}".format(signal), MissingDataWarning) C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\can_decoder\DecoderBase.py:53: MissingDataWarning: No data found for signal Signal "MCU_Temperature" 32:8 warnings.warn("No data found for signal {}".format(signal), MissingDataWarning) Exception in thread Thread-292: Traceback (most recent call last): File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1378, in run self.function(*self.args, **self.kwargs) File "C:\Users\hugoa\OneDrive\Escritorio\backend_ver2\applications\converter\converter_timer.py", line 9, in timer_converter x = converter.main() File "C:\Users\hugoa\OneDrive\Escritorio\backend_ver2\applications\converter\aws_converter.py", line 73, in main self.converter(devices_folder, id_bus) File "C:\Users\hugoa\OneDrive\Escritorio\backend_ver2\applications\converter\aws_converter.py", line 99, in converter df_phys_join = restructure_data(df_phys=df_phys_all, res="1S", full_col_names=True).fillna(0) File "C:\Users\hugoa\OneDrive\Escritorio\backend_ver2\applications\converter\UtilsFiles.py", line 101, in restructure_data df_phys_join = pd.merge_ordered( File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 321, in merge_ordered result = _merger(left, right) File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 290, in _merger op = _OrderedMerge( File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 1623, in init _MergeOperation.init( File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 703, in init self._maybe_coerce_merge_keys() File "C:\Users\hugoa\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\merge.py", line 1262, in _maybe_coerce_merge_keys raise ValueError(msg) ValueError: You are trying to merge on float64 and datetime64[ns, UTC] columns. If you wish to proceed you should use pd.concat

MatinF commented 1 year ago

Hi again,

Can you send a zip file that contains the entire folder (incl. log files, DBC files, Python scripts etc) so that I can run it on my end with the same files for further troubleshooting? You can send it to us here or via contact@csselectronics.com using e.g. wetransfer.com (your link in your message has run out)

MatinF commented 1 year ago

Closing this