Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #12607 (closed)

Opened 5 years ago

Closed 5 years ago

BUG: openTable fails ...

Reported by: spli Owned by:
Priority: major Milestone: 5.1.0-m3
Component: API Version: 5.0.5
Keywords: n.a. Cc: python-team@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

class TableStoreHelper(object):

    @staticmethod
    def get_columns(w):
        cols = [
            omero.grid.ImageColumn('ImageID'),
            omero.grid.RoiColumn('RoiID'),
            omero.grid.DoubleArrayColumn('Features', '', w),
        ]
        ftnames = ['x%d' % n for n in xrange(1, w + 1)]
        return cols, ftnames

    @staticmethod
    def create_table(sess, path, name):
        ncols = 2
        table = sess.sharedResources().newTable(0, 'name')
        cols, ftnames = TableStoreHelper.get_columns(ncols)
        table.initialize(cols)
        ofile = table.getOriginalFile()
        ofile.setPath(wrap(path))
        ofile.setName(wrap(name))
        ofile = sess.getUpdateService().saveAndReturnObject(ofile)
        tid = unwrap(ofile.getId())
        for n in xrange(ncols):
            table.setMetadata(str(n), wrap(ftnames[n]))
        table.close()
        return tid, cols, ftnames

tid, cols, fnames = TableStoreHelper.create_table(session, '/test','test.h5')
qs = client.getSession().getQueryService()
f = qs.get('OriginalFile', tid)
session.sharedResources().openTable(f)
# Returns None

Tables-0.log:

2014-10-21 12:03:47,354 INFO  [                            omero.remote] (Dummy-4   )  Meth: TablesI.getTable
2014-10-21 12:03:47,354 INFO  [                    omero.tables.TablesI] (Dummy-4   ) getTable: 266424 {'omero.session.uuid': 'fab3629b-20e8-4bf8-b1fa-4fa31eaca16e', 'omero.client.uuid': '9a516d00-45c2-4d6b-94d6-389da99171c3'}
2014-10-21 12:03:47,368 INFO  [                 omero.tables.HdfStorage] (Dummy-4   ) Size: 0 - Attaching Table-B9DA035F-562E-4698-A49B-59A53A33ACBB to /repositories/OMERO-5.0-merge-deploy/Files/Dir-266/266424
2014-10-21 12:03:47,368 INFO  [                            omero.remote] (Dummy-4   )  Rslt: B9DA035F-562E-4698-A49B-59A53A33ACBB -t @ Tables-0.TablesAdapter
2014-10-21 12:03:47,372 INFO  [                            omero.remote] (Dummy-3   )  Meth: TableI.initialize
2014-10-21 12:03:47,378 INFO  [                     omero.tables.TableI] (Dummy-3   ) Initialized Table-B9DA035F-562E-4698-A49B-59A53A33ACBB with 3 col(s)
2014-10-21 12:03:47,378 INFO  [                            omero.remote] (Dummy-3   )  Rslt: None
2014-10-21 12:03:47,379 INFO  [                            omero.remote] (Dummy-5   )  Meth: TableI.getOriginalFile
2014-10-21 12:03:47,380 INFO  [                     omero.tables.TableI] (Dummy-5   ) Table-B9DA035F-562E-4698-A49B-59A53A33ACBB.getOriginalFile() => id=266424
2014-10-21 12:03:47,380 INFO  [                            omero.remote] (Dummy-5   )  Rslt: object #0 (::omero::model::OriginalFile)
{
    _id = object #1 (::omero::RLong)
    {
        _val = 266424
    }
    _d
2014-10-21 12:03:47,425 INFO  [                            omero.remote] (Dummy-4   )  Meth: TableI.setMetadata
2014-10-21 12:03:47,426 INFO  [                     omero.tables.TableI] (Dummy-4   ) Table-B9DA035F-562E-4698-A49B-59A53A33ACBB.setMetadata() => 0=x1
2014-10-21 12:03:47,426 INFO  [                            omero.remote] (Dummy-4   )  Rslt: None
2014-10-21 12:03:47,428 INFO  [                            omero.remote] (Dummy-3   )  Meth: TableI.setMetadata
2014-10-21 12:03:47,428 INFO  [                     omero.tables.TableI] (Dummy-3   ) Table-B9DA035F-562E-4698-A49B-59A53A33ACBB.setMetadata() => 1=x2
2014-10-21 12:03:47,429 INFO  [                            omero.remote] (Dummy-3   )  Rslt: None
2014-10-21 12:03:47,430 INFO  [                            omero.remote] (Dummy-5   )  Meth: TableI.close
2014-10-21 12:03:47,430 INFO  [                 omero.tables.HdfStorage] (Dummy-5   ) Size: 1 - Detaching Table-B9DA035F-562E-4698-A49B-59A53A33ACBB from /repositories/OMERO-5.0-merge-deploy/Files/Dir-266/266424
2014-10-21 12:03:47,430 INFO  [                 omero.tables.HdfStorage] (Dummy-5   ) Cleaning storage: /repositories/OMERO-5.0-merge-deploy/Files/Dir-266/266424
2014-10-21 12:03:47,431 INFO  [                     omero.tables.TableI] (Dummy-5   ) Closed Table-B9DA035F-562E-4698-A49B-59A53A33ACBB
2014-10-21 12:03:47,580 INFO  [                     omero.tables.TableI] (Dummy-5   ) Updated file object 266424 to hash=None (6304 bytes)
2014-10-21 12:03:47,580 INFO  [                            omero.remote] (Dummy-5   )  Rslt: None
2014-10-21 12:03:47,607 INFO  [                            omero.remote] (Dummy-4   )  Meth: TablesI.getTable
2014-10-21 12:03:47,607 INFO  [                    omero.tables.TablesI] (Dummy-4   ) getTable: 266424 {'omero.session.uuid': 'fab3629b-20e8-4bf8-b1fa-4fa31eaca16e', 'omero.client.uuid': '9a516d00-45c2-4d6b-94d6-389da99171c3'}
2014-10-21 12:03:47,611 ERROR [                 omero.tables.HdfStorage] (Dummy-4   ) HDFStorage initialized with bad path: /repositories/OMERO-5.0-merge-deploy/Files/Dir-266/266424
2014-10-21 12:03:47,612 INFO  [                            omero.remote] (Dummy-4   )  Excp: exception ::omero::ValidationException
{
    serverStackTrace = None
    serverExceptionClass = None
    message = HDFSt

Change History (2)

comment:1 Changed 5 years ago by spli

Looks like the H5 file is corrupted:

[spli@ome-c6100-1 ~]$ python
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tables
>>> f='/repositories/OMERO-5.0-merge-deploy/Files/Dir-266/266424'
>>> tables.openFile(f)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/tables/file.py", line 230, in openFile
    return File(filename, mode, title, rootUEP, filters, **kwargs)
  File "/usr/lib64/python2.6/site-packages/tables/file.py", line 495, in __init__
    self._g_new(filename, mode, **params)
  File "hdf5Extension.pyx", line 317, in tables.hdf5Extension.File._g_new (tables/hdf5Extension.c:3039)
tables.exceptions.HDF5ExtError: HDF5 error back trace

  File "H5F.c", line 1522, in H5Fopen
    unable to open file
  File "H5F.c", line 1313, in H5F_open
    unable to read superblock
  File "H5Fsuper.c", line 351, in H5F_super_read
    unable to load superblock
  File "H5AC.c", line 1322, in H5AC_protect
    H5C_protect() failed.
  File "H5C.c", line 3567, in H5C_protect
    can't load entry
  File "H5C.c", line 7957, in H5C_load_entry
    unable to load entry
  File "H5Fsuper_cache.c", line 471, in H5F_sblock_load
    truncated file

End of HDF5 error back trace

Unable to open/create file '/repositories/OMERO-5.0-merge-deploy/Files/Dir-266/266424'

comment:2 Changed 5 years ago by spli

  • Resolution set to duplicate
  • Status changed from new to closed

See #12606

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.74845 sec.)

We're Hiring!