Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob bob
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bobbob
  • bobbob
  • Issues
  • #16
Closed
Open
Issue created Feb 08, 2012 by André Anjos@andre.anjos💬Owner

Loading an hdf5 Arrayset requires write access

Created by: laurentes

Loading an .hdf5 file as an Arrayset with read permission but without write permission generates the following runtime error:


bob.io.Arrayset('/idiap/temp/pmotlic/TEMP.2/MOBIO/DATA/f007/f007_04_r06_i0_0.hdf5')
Traceback (most recent call last):
  File "", line 1, in 
RuntimeError: Call to HDF5 C-function 'H5Fopen' returned '-1'. HDF5 error statck follows:

whereas it works fine for Array or using bob.io.load:


bob.io.Array('/idiap/temp/pmotlic/TEMP.2/MOBIO/DATA/f007/f007_04_r06_i0_0.hdf5')
  Array float64@(351, 60)
bob.io.load('/idiap/temp/pmotlic/TEMP.2/MOBIO/DATA/f007/f007_04_r06_i0_0.hdf5')
array([[ -1.23146095e+01,  -7.83866215e+00,   1.74252892e+01, ...,
         -2.80604903e-02,  -3.33320588e-01,   1.99772105e-01],
       [ -1.34626703e+01,  -8.39167404e+00,   1.67254601e+01, ...,
          1.30144298e-01,  -1.32815793e-01,   2.55901814e-01],
       [ -7.23934698e+00,  -3.61744595e+00,   1.45476503e+01, ...,
          9.95570198e-02,   2.48753905e-01,   1.26341403e-01],
       ..., 
       [ -1.02341805e+01,  -3.34847593e+00,   1.06275997e+01, ...,
          1.29639900e+00,   3.63285094e-01,   1.51863798e-01],
       [ -6.78214598e+00,   2.78683591e+00,   1.41695900e+01, ...,
          7.74318576e-01,   8.26705305e-04,   6.93367869e-02],
       [ -7.07084513e+00,   1.43504307e-01,   1.79709702e+01, ...,
         -2.10530292e-02,  -2.02032804e-01,  -1.68551896e-02]])

If I copy the file to get write permission, then the loading can be done correctly:


bob.io.Arrayset('/idiap/home/lelshafey/f007_04_r06_i0_0.hdf5')
  Arrayset[351] float64@(60,)

I guess there is a write flag which is set incorrectly in the hdf5 support part.

Assignee
Assign to
Time tracking