tensorboy / pytorch_Realtime_Multi-Person_Pose_Estimation

1.36k stars 411 forks source link

OSError: [WinError 123] 文件名、目录名或卷标语法不正确。 #115

Closed mk9667245 closed 4 years ago

mk9667245 commented 5 years ago

请问下面这个错误怎么改?

Traceback (most recent call last): File "D:/Practice/Python/Pose2Seg-master/Pose2Seg-master/train.py", line 34, in LOGDIR, SNAPSHOTDIR = setup_logdir() File "D:/Practice/Python/Pose2Seg-master/Pose2Seg-master/train.py", line 30, in setup_logdir os.makedirs(LOGDIR) File "D:\Software\Anaconda3\lib\os.py", line 220, in makedirs mkdir(name, mode) OSError: [WinError 123] 文件名、目录名或卷标语法不正确。: 'log\release_base_2019-10-07_16:22:28'

运行的是:/Pose2Seg-master/train.py

报错代码如下

def setup_logdir():
timestamp = time.strftime("%Y-%m-%d_%H:%M:%S", time.localtime()) 
LOGDIR = os.path.join('logs', '%s_%s'%(NAME, timestamp))
SNAPSHOTDIR = os.path.join('snapshot', '%s_%s'%(NAME, timestamp))
if not os.path.exists(LOGDIR):
   os.makedirs(LOGDIR)#报错点1
 if not os.path.exists(SNAPSHOTDIR):
     os.makedirs(SNAPSHOTDIR)
 return LOGDIR, SNAPSHOTDIR
 LOGDIR, SNAPSHOTDIR = setup_logdir()#报错点2`
tensorboy commented 4 years ago

Are you sure the bug comes from this project?