Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect #101

Open
VickkyMama opened this issue Mar 14, 2023 · 2 comments

Comments

@VickkyMama
Copy link

Hi, I followed the steps on github for implementation but it displayed this - OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'runs/train_base/magicpoint_synth_2023-03-14_13:08:15'

I am running on Conda PyCharm

It works well on Google Colab but I want to run it on my local computer. I have searched online but couldn't get any help.

This is the complete error message. Please help urgently

(py36-sp) C:\Users\pytorchSuperpoint>python train4.py train_base configs/magicpoint_shapes_pair.yaml magicpoint_synth --eval
2023-03-14 12:53:54 LAPTOP root[5452] INFO Running command TRAIN_BASE
2023-03-14 12:53:54 LAPTOP root[5452] INFO train on device: cpu
Traceback (most recent call last):
File "C:\Users\anaconda3\envs\Superpoint\envs\py36-sp\lib\site-packages\tensorboardX\record_writer.py", line 47, in directory_check
factory = REGISTERED_FACTORIES[prefix]
KeyError: 'runs/train_base/magicpoint_synth_2023-03-14_12'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "train4.py", line 141, in
args.func(config, output_dir, args)
File "train4.py", line 41, in train_base
return train_joint(config, output_dir, args)
File "train4.py", line 62, in train_joint
exper_name=args.exper_name, date=True))
File "C:\Users\anaconda3\envs\Superpoint\envs\py36-sp\lib\site-packages\tensorboardX\writer.py", line 293, in init
self._get_file_writer()
File "C:\Users\anaconda3\envs\Superpoint\envs\py36-sp\lib\site-packages\tensorboardX\writer.py", line 345, in _get_file_writer
**self.kwargs)
File "C:\Users\anaconda3\envs\Superpoint\envs\py36-sp\lib\site-packages\tensorboardX\writer.py", line 104, in init
logdir, max_queue, flush_secs, filename_suffix)
File "C:\Users\anaconda3\envs\Superpoint\envs\py36-sp\lib\site-packages\tensorboardX\event_file_writer.py", line 104, in init
directory_check(self._logdir)
File "C:\Users\anaconda3\envs\Superpoint\envs\py36-sp\lib\site-packages\tensorboardX\record_writer.py", line 51, in directory_check
os.makedirs(path)
File "C:\Users\anaconda3\envs\Superpoint\envs\py36-sp\lib\os.py", line 220, in makedirs
mkdir(name, mode)
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'runs/train_base/magicpoint_synth_2023-03-14_13:08:15'

@VickkyMama
Copy link
Author

Solved.

Windows does not support some special characters as filename and the filename had time (:) so I had to change to underscore (_).
It can be changed in the utils.py line 901

from this:

str_date_time = datetime.datetime.now().strftime("%Y-%m-%d_%H:%M:%S")

To this:

str_date_time = datetime.datetime.now().strftime("%Y-%m-%d_%H_%M_%S")

@lzyhero
Copy link

lzyhero commented Oct 18, 2023

I encountered the same problem as you, thank you for your answer. It has helped me a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants