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 #8117 (closed)

Opened 8 years ago

Closed 8 years ago

BUG: Exporter not working across groups

Reported by: cneves Owned by: cneves
Priority: major Milestone: OMERO-4.4
Component: General Version: n.a.
Keywords: n.a. Cc: jburel, jamoore
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2012-02-28 (9)

Description

exporter.generateTiff is not honoring {'omero.group':'-1'}.

https://github.com/cneves/openmicroscopy/commit/0cdeda8385528d6b3043d6caea91b89bb66cc1d9 extends a test (gatewaytest.image.ImageTest?.testExport) that shows this behavior.

Change History (4)

comment:1 Changed 8 years ago by jmoore

  • Milestone changed from Unscheduled to OMERO-Beta4.4
  • Remaining Time set to 0.25
  • Sprint set to 2012-02-28 (9)
  • Status changed from new to accepted

comment:2 Changed 8 years ago by jmoore

  • Cc jmoore added
  • Owner changed from jmoore to cneves-x

Carlos, even after applying the following patch, I can't get the test to work properly:

diff --git a/components/tools/OmeroPy/src/omero/gateway/scripts/dbhelpers.py b/components/tools/OmeroPy/src/omero/gateway/scripts/dbhelpers.py
index acd1395..ce679a4 100644
--- a/components/tools/OmeroPy/src/omero/gateway/scripts/dbhelpers.py
+++ b/components/tools/OmeroPy/src/omero/gateway/scripts/dbhelpers.py
@@ -243,10 +243,13 @@ class DatasetEntry (ObjectEntry):
                 project = self.project
         else:
             project = forceproj
-        for d in project.listChildren():
-            if d.getName() == self.name and ((self.description is None and d.getDescription() == '') or (self.description is not None and omero.gateway.omero_type(d.getDescription()) == omero.gateway.omero_type(self.description))):
-                d.__loadedHotSwap__()
-                return d
+
+        if project:
+            for d in project.listChildren():
+                if d.getName() == self.name and ((self.description is None and d.getDescription() == '') or (self.description is not None and omero.gateway.omero_type(d.getDescription()) == omero.gateway.omero_type(self.description))):
+                    d.__loadedHotSwap__()
+                    return d
+
         return None
 
     def create (self):
@@ -286,9 +289,12 @@ class ImageEntry (ObjectEntry):
             dataset = DATASETS[self.dataset].get(client)
         else:
             dataset = forceds
-        for i in dataset.listChildren():
-            if i.getName() == self.name:
-                return i
+
+        if dataset:
+            for i in dataset.listChildren():
+                if i.getName() == self.name:
+                    return i
+
         return None
 
     def create (self):
diff --git a/components/tools/OmeroPy/test/gatewaytest/image.py b/components/tools/OmeroPy/test/gatewaytest/image.py
index f87c18d..806bca0 100644
--- a/components/tools/OmeroPy/test/gatewaytest/image.py
+++ b/components/tools/OmeroPy/test/gatewaytest/image.py
@@ -173,7 +173,7 @@ class ImageTest (lib.GTest):
         self.assert_(len(self.image.exportOmeTiff()) > 0)
         # Now try the same using a different user, admin first
         self.loginAsAdmin()
-        sopts = dict(self.gateway.CONFIG['SERVICE_OPTS'] or {})
+        sopts = {} # dict(self.gateway.CONFIG['SERVICE_OPTS'] or {})
         sopts['omero.group'] = '-1'
         self.gateway.CONFIG['SERVICE_OPTS'] = sopts
         image = self.getTestImage()

I'm seeing:

@3529-callcontext ~/tmp/sprint9/components/tools/OmeroPy $ python test/gatewaytest/image.py ImageTest.testExport
E
======================================================================
ERROR: Test exporting the image to ometiff
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/gatewaytest/image.py", line 180, in testExport
    self.assertEqual(image.getId(), self.image.getId())
AttributeError: 'NoneType' object has no attribute 'getId'

----------------------------------------------------------------------
Ran 1 test in 7.490s

FAILED (errors=1)

which I don't think is what you meant with this ticket. Passing back to you.

comment:3 Changed 8 years ago by jmoore

Note: I merged e86e4d8 - (carlos/merging_gs) fixing gateway.image exportOmeTiff test (8 hours ago) <Carlos Neves> in to create the branch I'm testing from:

@3529-callcontext ~/tmp/sprint9/components/tools/OmeroPy $ git graph
*   940b0db - (HEAD, 3529-callcontext) Merge commit 'e86e4d8' into 3529-callcontext (9 minutes ago) <jmoore>
|\  
| * e86e4d8 - (carlos/merging_gs) fixing gateway.image exportOmeTiff test (8 hours ago) <Carlos Neves>
| * d97a84e - fixing gateway.services tables test (8 hours ago) <Carlos Neves>
| * 31ce979 - removing print statement (8 hours ago) <Carlos Neves>
| * 9b2ee70 - Trying once more to remove spurious logging (8 hours ago) <Carlos Neves>
* | e3f1a9b - (josh/3529-callcontext) Use group of pixels in PixelDataThread (23 hours ago) <jmoore>

comment:4 Changed 8 years ago by jmoore

  • Remaining Time changed from 0.25 to 0
  • Resolution set to invalid
  • Status changed from accepted to closed

Commit got lost. Closing invalid.

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.79944 sec.)

We're Hiring!