Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working #10

Open
scottlee5980 opened this issue Apr 19, 2024 · 0 comments
Open

Not working #10

scottlee5980 opened this issue Apr 19, 2024 · 0 comments

Comments

@scottlee5980
Copy link

Hi. Bro

This is Scott from S.Korea.

I just wanna test this code for checking my drone-GPS ~
I install python3.12
when I try to this, found error logs. could you please let me know how to fix it ?

python nmea_data_convert.py test_data/test_data_0_all.nmea csv -cs GNRMC

PS D:\02_DEV_TOOLS\102.GNSS Utility\nmea_data_convert-master\nmea_data_convert-master> python nmea_data_convert.py test_data/test_data_0_all.nmea csv -cs GNRMC

Reading in data... done.

Processing data... Traceback (most recent call last):
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\internals\construction.py", line 939, in _finalize_columns_and_data
columns = _validate_or_indexify_columns(contents, columns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\internals\construction.py", line 986, in _validate_or_indexify_columns
raise AssertionError(
AssertionError: 20 columns passed, passed data had 18 columns

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\02_DEV_TOOLS\102.GNSS Utility\nmea_data_convert-master\nmea_data_convert-master\nmea_data_convert.py", line 686, in
main()
File "D:\02_DEV_TOOLS\102.GNSS Utility\nmea_data_convert-master\nmea_data_convert-master\nmea_data_convert.py", line 659, in main
sentence_dfs = process_data_common(sentences, args) # Cycle starts with 'GNRMC' sentence
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\02_DEV_TOOLS\102.GNSS Utility\nmea_data_convert-master\nmea_data_convert-master\nmea_data_convert.py", line 644, in process_data_common
sentence_dfs = sentences_to_dataframes(sentence_sets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\02_DEV_TOOLS\102.GNSS Utility\nmea_data_convert-master\nmea_data_convert-master\nmea_data_convert.py", line 432, in sentences_to_dataframes
df = pd.DataFrame(list_of_data_rows, columns=columns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\frame.py", line 851, in init
arrays, columns, index = nested_data_to_arrays(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\internals\construction.py", line 520, in nested_data_to_arrays
arrays, columns = to_arrays(data, columns, dtype=dtype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\internals\construction.py", line 845, in to_arrays
content, columns = _finalize_columns_and_data(arr, columns, dtype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\internals\construction.py", line 942, in _finalize_columns_and_data
raise ValueError(err) from err
ValueError: 20 columns passed, passed data had 18 columns

Thanks in advanced
Scott.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant