Comments (8)
A possible workaround would be enclose .close() method calls
within try-except block. This is to see whether the tests
pass under Windows.
Next workaround would be to remove temporary files using atexit module.
Perhaps the memmap files are closed at the exit time of Python.
Original comment by pearu.peterson
on 8 Nov 2011 at 9:23
- Changed state: Accepted
from pylibtiff.
You meant to enclose os.remove() calls within try-except block, don't you?
Original comment by [email protected]
on 8 Nov 2011 at 9:28
from pylibtiff.
Yes.
Original comment by pearu.peterson
on 8 Nov 2011 at 10:15
from pylibtiff.
With this patch tests proceed without error. But it's only a workaround, few
thousands of temporary files are created...
Original comment by [email protected]
on 8 Nov 2011 at 10:18
Attachments:
from pylibtiff.
hundreds not thousands...
Original comment by [email protected]
on 8 Nov 2011 at 10:20
from pylibtiff.
I just committed a patch that uses atexit to cleanup temporary files.
Let me know whether it works under Windows.
Original comment by pearu.peterson
on 8 Nov 2011 at 10:53
from pylibtiff.
It doesn't work.
c:\...\libtiff\tests>nosetests -s
.....277:292,[[(250, 0, 0) (0, 251, 0) (0, 0, 252)]
[(250, 0, 0) (0, 251, 0) (0, 0, 252)]]
[array([[[250, 0, 0],
[250, 0, 0]]], dtype=uint8), array([[[ 0, 251, 0],
[ 0, 251, 0]]], dtype=uint8), array([[[ 0, 0, 252],
[ 0, 0, 252]]], dtype=uint8)]
...
----------------------------------------------------------------------
Ran 8 tests in 4.486s
OK
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\Python27\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
WindowsError: [Error 32] The process cannot access the file because it is being
used by another process: 'c:\\users\\smid\\appdata\\local\\temp\\tmpw3kmc0.tif'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\Python27\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
WindowsError: [Error 32] The process cannot access the file because it is being
used by another process: 'c:\\users\\smid\\appdata\\local\\temp\\tmptwma83.tif'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\Python27\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
...
...
...
Maybe this can give a clue:
http://stackoverflow.com/questions/1519956/numpy-and-memmap-errno-24-too-many-op
en-files but I do not have time to do it myself just now.
Original comment by [email protected]
on 8 Nov 2011 at 12:06
from pylibtiff.
Ok, I'll take a look at it later. Occasionally, I have seen
the too many open files issue when working over nfs and
the proposed clue is very interesting to me too.
Thanks for feedback so far!
Original comment by pearu.peterson
on 8 Nov 2011 at 12:44
from pylibtiff.
Related Issues (20)
- TIFFimage and RGB HOT 4
- Support for EXIF tags HOT 3
- fails to compile (Windows 7, VS2008, Python 2.7, numpy 1.6.1) HOT 6
- TIFF.write_image writes incorrect ORIENTATION tag HOT 4
- Reading tiffarray of large images
- http://openjpeg.googlecode.com/svn/dev-utils/scripts/generate_big_files.sh HOT 3
- RGB image format doesn't follow the standard numpy RGB format HOT 2
- import libtiff fails HOT 4
- bittools extension fails to compile on Fedora 18 (python 2.7.3, gcc 4.7.2, numpy 1.7.0) HOT 5
- Enhance parsing of tiff.h HOT 1
- TIFF.read_image() fails to read RGB images HOT 1
- Unknown TIFF tags HOT 2
- Writing a field with an empty string segfault with the C wrapper HOT 1
- Failure to import tif_lzw HOT 3
- incorrectly imports big-endian 16bit uints
- Fail to import libtiff in Ubuntu 14.04 HOT 8
- Let's put pylibtiff on PyPI so that other packages can install it as a dependency. HOT 2
- libtiff 4.x and custom tags
- Cannot be installed with Python3 (even after 2to3 translator)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pylibtiff.