Thanks to visit codestin.com
Credit goes to github.com

Skip to content

WindowsError: The process cannot access the file because it is being used by another process #121

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

Closed
megies opened this issue Oct 15, 2017 · 2 comments · Fixed by #122
Closed

Comments

@megies
Copy link
Contributor

megies commented Oct 15, 2017

In appveyor, I'm having trouble deleting .dbf files that were written by a shapefile.Writer and subsequently read again by a shapefile.Reader (to check contents were written correctly).
I'm getting the following error: WindowsError: [Error 32] The process cannot access the file because it is being used by another process: u'c:\\users\\appveyor\\appdata\\local\\temp\\1\\obspy-ogjwjz\\inventory.dbf' on a os.remove(filename) call: See https://ci.appveyor.com/project/obspy/obspy/build/1.0.5339-master/job/ox2tu1p3xry0kkx4#L573

I suspect the Reader is likely to blame, but even a manual reader_instance.close() call did not make this error go away.

Have you seen something like the above before?

See obspy/obspy#1933.

@GeospatialPython
Copy link
Owner

Try:

reader_instance = None

@megies
Copy link
Contributor Author

megies commented Nov 7, 2017

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

Successfully merging a pull request may close this issue.

2 participants