[Errno 22] Invalid argument: ‘snapshot\multi_variable_sht\seqlen:20_mse_mape_10-19-15-15:07-07.txt’
错误代码片段
//
parser.add_argument('--output_path',type=str,default="snapshot\multi_variable_sht")
loss_file_path = args.output_path
loss_file_name = 'seqlen:{0}_mse_mape_{1}.txt'.format(str(sequence_length),str(get_time()))
fo = open(osp.join(loss_file_path,loss_file_name),'w') #打开snapshot\\multi_variable_sht\\seqlen:20_mse_mape_10-19-15-15:07-07.txt
//
运行前三行都没有问题,运行 fo 时出现标题错误提示。
首先,根据链接: link.排查是否是“/”,"\",“\”符号错用导致。
其次,就是我遇到的这种相对路径出现错误的情况,parser.add_argument(’–output_path’,type=str,default="–snapshot\multi_variable_sht")<