Real-time-GesRec
Real-time-GesRec copied to clipboard
bugs in utils/egogesture_json.py
'DataFrame' object has no attribute 'ix'
File "utils/egogesture_json.py", line 86, in <module>
val_csv_path, dst_json_path)
File "utils/egogesture_json.py", line 53, in convert_egogesture_csv_to_activitynet_json
train_database = convert_csv_to_dict(train_csv_path, 'training', labels)
File "utils/egogesture_json.py", line 9, in convert_csv_to_dict
data = pd.read_csv(csv_path, delimiter=' ', header=None)
File "/home/cuge/anaconda3/envs/gesture/lib/python3.6/site-packages/pandas/io/parsers.py", line 685, in parser_f
return _read(filepath_or_buffer, kwds)
File "/home/cuge/anaconda3/envs/gesture/lib/python3.6/site-packages/pandas/io/parsers.py", line 463, in _read
data = parser.read(nrows)
File "/home/cuge/anaconda3/envs/gesture/lib/python3.6/site-packages/pandas/io/parsers.py", line 1154, in read
ret = self._engine.read(nrows)
File "/home/cuge/anaconda3/envs/gesture/lib/python3.6/site-packages/pandas/io/parsers.py", line 2059, in read
data = self._reader.read(nrows)
File "pandas/_libs/parsers.pyx", line 881, in pandas._libs.parsers.TextReader.read
File "pandas/_libs/parsers.pyx", line 896, in pandas._libs.parsers.TextReader._read_low_memory
File "pandas/_libs/parsers.pyx", line 950, in pandas._libs.parsers.TextReader._read_rows
File "pandas/_libs/parsers.pyx", line 937, in pandas._libs.parsers.TextReader._tokenize_rows
File "pandas/_libs/parsers.pyx", line 2132, in pandas._libs.parsers.raise_parser_error
pandas.errors.ParserError: Error tokenizing data. C error: Expected 4 fields in line 287, saw 5
1st problem:
- You can change all 'ix' to 'loc'.
2nd problem:
- There were some problems with egoGesture annotation file. You go to "trainlistall.txt" (or any file you generated when run the annotation code).
- Check the line "287" (according to your error). You will see some error line: "Subject03\Scene2\Color\rgb7 nan nan"
- Follow the data path to "labels-final-revised1" in the egoGesture dataset. In this case: "labels-final-revised1\Subject03\Scene2".
- You will see some .csv file.
- Open and check all, you will see some abnormal sign like "" at the end of the file. Remove it.
- Run the annotation code again.
Hello @cuge1995,
were you able to run this code? thanks @ghost for fixing this issue but still I'm not able to run the main.py file.
=it gives me error as follows:
Traceback (most recent call last):
File "C:\Users\PRASH\Project_3D_design\Real-time-GesRec-master\main.py", line 98, in
(user_interface) C:\Users\PRASH\Project_3D_design\Real-time-GesRec-master>