RUCAIBox / RecSysDatasets

This is a repository of public data sources for Recommender Systems (RS).
https://recbole.io/
805 stars 129 forks source link

[ta-feng dataset] ValueError: time data '1-01-200' does not match format '%m/%d/%Y' #89

Closed laxmimerit closed 3 years ago

laxmimerit commented 3 years ago

Hi, I am trying to generate datafiles from the raw format. I followed and generated once but after some time I tried to regenerate, it is throwing this error.

 python run.py --dataset ta-feng --input_path ta-feng --output_path output_data/ta-feng --duplicate_removal --convert_inter
  0%|                                                                                                                     | 1/817742 [00:00<26:51, 507.54it/s]
Traceback (most recent call last):
  File "run.py", line 40, in <module>
    datasets.convert_inter()
  File "C:\Users\laxmi\Google Drive\Recommendation\RecBole\Learning\RecDatasets\conversion_tools\src\extended_dataset.py", line 4793, in convert_inter
    line_list[0] = int(time.mktime(time.strptime(line_list[0], "%m/%d/%Y")))
  File "C:\ProgramData\Anaconda3\lib\_strptime.py", line 559, in _strptime_time
    tt = _strptime(data_string, format)[0]
  File "C:\ProgramData\Anaconda3\lib\_strptime.py", line 362, in _strptime
    (data_string, format))
ValueError: time data '1-01-200' does not match format '%m/%d/%Y'

Any idea why this is happening?

laxmimerit commented 3 years ago

Update [Solution]: Understood the problem. I had opened the CSV file in MS Excel and just did the usual save. So somehow MS Excel introducing some issue in the file after save. I copied the fresh file from the unzipped folder and it is working. Just to verify the problem, I saved again and got the same issue. So do not save files after opening in MS Excel.

hyp1231 commented 3 years ago

Glad to see that the problem has been resolved, thank you for your attention!