Problem with rec-center-hourly.csv


When I change and save again the rec-center-hourly.csv, it will show this mistake, can you direct me?

ValueError: The provided timestamp 2007/2/10 0:00 is malformed. The supported formats are: [%Y-%m-%d %H:%M:%S.%f, %Y-%m-%d %H:%M:%S:%f, %Y-%m-%d %H:%M:%S, %Y-%m-%d %H:%M, %Y-%m-%d, %m/%d/%Y %H:%M, %m/%d/%y %H:%M, %Y-%m-%dT%H:%M:%S.%fZ, %Y-%m-%dT%H:%M:%SZ, %Y-%m-%dT%H:%M:%S]


Did you change any of the data in the file?


Only change one number of the consumption, 5->6 in one line.


Are you in Windows?


Yes, WIN7 python 2.7


I find the problem is the difrence between \r\n and \n, so is there any easy way to read both?


It should read both. I’ll have to file this as a bug, but I need more information. What code are you running that is reading rec-center-hourly.csv?

In the meantime, you’ll have to figure out how to convert it back. You might use a different text editor that doesn’t replace EOL characters.


I’m running the under win7 Spyder 3.2.4

and when edited and saved by MS excel, the rec-center-hourly.csv will be changed to \r\n, so the problem will appear.


My advice to fix this right now is to:

  1. Revert the csv file
  2. edit it in a bland text editor that won’t save line feeds differently (not Excel)
  3. try again?