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

WindowsError: [Error 183] Cannot create a file when that file already exists #9

Open
jquery404 opened this issue Nov 17, 2016 · 1 comment

Comments

@jquery404
Copy link

While running the train.py script I am getting the following error

os.rename(self, new)  
WindowsError: [Error 183] Cannot create a file when that file already exists

I am using Python 2.7

@NatholBMX
Copy link

NatholBMX commented Jan 2, 2017

I have solved this issue. In the file "checkpoints.py" you have to make some additions after this:

tmp_fname = Path(fname.stripext() + '.tmp.npz') # TODO yes, this is a hack
np.savez_compressed(str(tmp_fname), **param_dict)

Insert following:

try:
    os.unlink(fname)
except OSError:
    pass

Also, don't forget to import os

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