Skip to content

Fix WindowsError: [Error 32] The process cannot access the file#3250

Merged
tacaswell merged 3 commits into
matplotlib:masterfrom
cgohlke:patch-2
Jul 18, 2014
Merged

Fix WindowsError: [Error 32] The process cannot access the file#3250
tacaswell merged 3 commits into
matplotlib:masterfrom
cgohlke:patch-2

Conversation

@cgohlke
Copy link
Copy Markdown
Contributor

@cgohlke cgohlke commented Jul 13, 2014

Fixes several errors in test_backend_pdf.test_multipage_keep_empty on Windows, where files can not be deleted while being open. For example:

======================================================================
ERROR: matplotlib.tests.test_backend_pdf.test_multipage_keep_empty
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python27-x64\lib\site-packages\nose\case.py", line 197, in runTest
    self.test(*self.arg)
  File "X:\Python27-x64\lib\site-packages\matplotlib\testing\decorators.py", line 110, in wrapped_function
    func(*args, **kwargs)
  File "X:\Python27-x64\lib\site-packages\matplotlib\tests\test_backend_pdf.py", line 67, in test_multipage_keep_empty
    os.remove(filename)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\users\\gohlke\\appdata\\local\\temp\\tmpc9vzti'

cgohlke added 3 commits July 13, 2014 13:10
Fixes WindowsError: [Error 32] The process cannot access the file because it is being used by another process
Fix WindowsError: [Error 32] The process cannot access the file because it is being used by another process
@tacaswell tacaswell added this to the v1.4.0 milestone Jul 14, 2014
@cgohlke
Copy link
Copy Markdown
Contributor Author

cgohlke commented Jul 15, 2014

There is another case in test_animation.py, where ImageMagick's convert tool can not write to an open NamedTemporaryFile. Closing the NamedTemporaryFile before anim.save seems to work but another issue prevents the test to pass...

tacaswell added a commit that referenced this pull request Jul 18, 2014
Fix WindowsError: [Error 32] The process cannot access the file
@tacaswell tacaswell merged commit 4314d44 into matplotlib:master Jul 18, 2014
tacaswell added a commit that referenced this pull request Jul 18, 2014
Fix WindowsError: [Error 32] The process cannot access the file
@tacaswell
Copy link
Copy Markdown
Member

cherry picked to v1.4.x as e2fbeb3

jbmohler pushed a commit to jbmohler/matplotlib that referenced this pull request Aug 14, 2014
Fix WindowsError: [Error 32] The process cannot access the file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants