-
Notifications
You must be signed in to change notification settings - Fork 6
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
Error in sample script #5
Comments
Sorry, I don't understand this issue. the data format in CEAP-360VR dataset is json, but it seems your code loaded csv file. I am not sure how you did this conversion. |
Hello, I am simply trying to run the sample Jupyter notebook in the Scripts folder and am receiving this error. Can you advise? Many thanks. |
Hello, are you able to help with error in the sample script? Thank you. |
@luisqtr seems this issue may be due to the Jupyter notebook you created -- would you help resolve this? Thanks! |
Hi @emilydoherty. Thanks for reporting the error. Apparently it is an incompatibility between pandas v2.0 (which I assume you are using in Python 3.11), and pandas v1.5.2 used to create the library back then. I fixed and tested in pandas 2.0.3, we should wait for @abdoelali to accept the pull request in the main repo or otherwise you can download it from my fork. Let us know if you still have errors after running the latest version. In case you need the .CSV right away, you can download them from this link and extract the .zip in the path: |
Thanks very much for your quick reply! I will use the .csv. Thanks again. |
One more question: do you have the .csv files resulting from the baseline scripts? I'm specifically looking for the .csv with features extracted for ML purposes. I'm running into several errors when trying to run the scripts. Many thanks. |
Do you mean the file |
Where the compiled dataset will be stored
DATASET_POSTPROCESSED_FILENAME = gen_path_temp("Dataset_CEAP", extension=".csv")
Load or create dataframe with statistics of initial dataset
df_ceap = None
try:
df_ceap = pd.read_csv(DATASET_POSTPROCESSED_FILENAME)
print("Data loaded from file")
except:
print("Creating file")
# Load all data resampled by frame
for pid in PARTICIPANTS_IDS: # Which participants to load
for dttype in DATA_GROUPS: # Which data type to load
for prep in ["Frame"]: # Which processing level
df_single_file = data_manager.load_data_from_participant(pid, dttype, prep, clean_physio=True)
df_ceap = df_single_file if (df_ceap is None) else pd.concat([df_ceap, df_single_file], axis=0)
print(f"\n\tFinished creating files {DATASET_POSTPROCESSED_FILENAME}")`
Getting the following error:
FileNotFoundError Traceback (most recent call last)
Cell In[23], line 6
5 try:
----> 6 df_ceap = pd.read_csv(DATASET_POSTPROCESSED_FILENAME)
7 print("Data loaded from file")
File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/io/parsers/readers.py:912, in read_csv(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, date_format, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, encoding_errors, dialect, on_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options, dtype_backend)
910 kwds.update(kwds_defaults)
--> 912 return _read(filepath_or_buffer, kwds)
File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/io/parsers/readers.py:577, in _read(filepath_or_buffer, kwds)
576 # Create the parser.
--> 577 parser = TextFileReader(filepath_or_buffer, **kwds)
579 if chunksize or iterator:
File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/io/parsers/readers.py:1407, in TextFileReader.init(self, f, engine, **kwds)
1406 self.handles: IOHandles | None = None
-> 1407 self._engine = self._make_engine(f, self.engine)
File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/io/parsers/readers.py:1661, in TextFileReader._make_engine(self, f, engine)
1660 mode += "b"
-> 1661 self.handles = get_handle(
1662 f,
1663 mode,
...
2627 raise TypeError(
2628 "Passing a dict as an indexer is not supported. Use a list instead."
2629 )
TypeError: Passing a set as an indexer is not supported. Use a list instead.
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
The text was updated successfully, but these errors were encountered: