Hi,
I'm running into a weird problem with an application using pytables on
Windows XP: tables.openFile refuses to create a file on the Desktop,
because 'the directory exists but it cannot be written'. At the same
time, I'm able to use the builtin function open() to create a file in
the same directory. Here is a sample interactive session ('Bureau' is
MS french for 'Desktop'):
>>> f = open('../../Bureau/toto.txt', 'w')
>>> f.write('toto')
>>> f.close()
>>> import tables
>>> hdf = tables.openFile('../../Bureau/toto.h5', 'w')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Python24\Lib\site-packages\tables\File.py", line 227, in
openFile
METADATA_CACHE_SIZE, nodeCacheSize)
File "hdf5Extension.pyx", line 580, in hdf5Extension.File.__new__
File "C:\Python24\Lib\site-packages\tables\utils.py", line 587, in
checkFileAccess
raise IOError("directory ``%s`` exists but it can not be written"
IOError: directory ``../../Bureau`` exists but it can not be written
>>> import os
>>> os.getcwd()
'C:\\Documents and Settings\\alexandre\\dev\\projects'
creating an hdf file in the projects directory works fine:
>>> hdf = tables.openFile('toto.h5', 'w')
>>> print hdf
toto.h5 (File) ''
Last modif.: 'Tue Aug 22 20:38:24 2006'
Object Tree:
/ (RootGroup) ''
I'm more of a Linux guy, but the customer gets the final word on the OS.
Any hint on what is going on is welcome. Maybe the permission check in
openFile() should be changed to a try...except clause?
In case it matters, I'm running WinXP SP1, python2.4 and pytables 1.3.2.
--
Alexandre Fayolle LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian: http://www.logilab.fr/formations
Développement logiciel sur mesure: http://www.logilab.fr/services
Informatique scientifique: http://www.logilab.fr/science
signature.asc
Description: Digital signature
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Pytables-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pytables-users
