HDFGroup / h5serv

Reference service implementation of the HDF5 REST API
Other
168 stars 35 forks source link

Improve util/h5tojson.py's IOError: Unable to create file. #37

Closed hyoklee closed 9 years ago

hyoklee commented 9 years ago

If directory is not writable, use /tmp for temporary file. At least, catch IOError and tell user that a directory is not writable for temporary file.

jreadey commented 9 years ago

I'm not sure I follow - h5tojson just writes to standard out. If I do something like this: python h5tojson.py tall.h5 >myreadonlydir/tall.json I get a typical shell error: -bash: myreadonlydir/tall.json: Permission denied

hyoklee commented 9 years ago

Make your current working directory readonly. For example, the directory where tall.h5 resides and see what happens.

jreadey commented 9 years ago

Fix is out. Joe - let me know if this works ok in Windows - there are some differences in how tempfiles are handled vs. Mac OS X and Linux.