【Error】IOError: [Errno 22] invalid mode ('wb') or filename

错误描述:

IOError: [Errno 22] invalid mode ('wb') or filename: 'C:\\Users\\Viral Patel\\Documents\\GitHub\\3DPhotovoltaics\\Data_Output\\Simulation_Data\\Raw_Data\\Raw_Simulation_Data_2014-03-24 17:21:20.545000.csv'

解决方案:

这个主要是文件名、路径中含有反转字符,具体请参照Naming Files, Paths, and Namespaces,路径中不要包含以下字符:

  • < (less than)
  • > (greater than)
  • : (colon)
  • " (double quote)
  • / (forward slash)
  • \ (backslash)
  • | (vertical bar or pipe)
  • ? (question mark)
  • * (asterisk)

两种解决方式:


参考

  • https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
  • http://stackoverflow.com/questions/15141761/region-ioerror-errno-22-invalid-mode-w-or-filename
  • http://stackoverflow.com/questions/22620965/ioerror-errno-22-invalid-mode-wb-or-filename

转载于:https://www.cnblogs.com/nju2014/p/5364453.html

你可能感兴趣的:(【Error】IOError: [Errno 22] invalid mode ('wb') or filename)