OMERO Python returns 'None', CLI returns FileAnnotationWrapper

Hello, the issue is that getObject returns ‘None’ for a subset of FileAnnotations (i.e. OMERO FigureIDs). I can’t determine what is different about these objects. The Python code works for about half of the objects. The FileAnnotationWrapper is also accessible from CLI and the OMERO Python shell.

The issue is summarized below.
-OMERO-py getObject returns ‘None’ for ID=2118088
-OMERO-py getObject returns for ID=2113526
-OMERO-CLI obj get returns information for both IDs

Any idea how to diagnose the bad IDs or why the FileAnnotationWrapper is accessible from CLI but not python?

Thanks!
j

bioc1301@mprocessor1:~/src/OMERO_scripts/json2figure$ python
Python 2.7.13 (default, Sep 26 2018, 18:42:22) 
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import omero_tools
>>> conn = omero_tools.get_connection()
>>> conn.SERVICE_OPTS.setOmeroGroup(omero_tools.project_gid)
>>> print conn.getObject('FileAnnotation', 2118088)
None
>>> print conn.getObject('FileAnnotation', 2113526)
<FileAnnotationWrapper id=2113526>
>>> quit()
!! 03/16/20 14:03:33.572 error: communicator not destroyed during global destruction.bioc1301@mprocessor1:~/src/OMERO_scripts/json2figure$ 
bioc1301@mprocessor1:~/src/OMERO_scripts/json2figure$ omero obj get FileAnnotation:2118088
Using session for bioc1301@omero1.bioch.ox.ac.uk:4064. Idle timeout: 10 min. Current group: davisgroup
description={"name": "fz2_CPTI003490_Overview_venusYFP_zegami1", "imageId": 506926}
file=OriginalFile:8543632
id=2118088
name=
ns=omero.web.figure.json
version=

bioc1301@mprocessor1:~/src/OMERO_scripts/json2figure$ omero obj get FileAnnotation:2113526
Using session for bioc1301@omero1.bioch.ox.ac.uk:4064. Idle timeout: 10 min. Current group: davisgroup
description={"name": "Cam_CPTI001284_Overview_venusYFP_zegami1", "imageId": 520305}
file=OriginalFile:8152561
id=2113526
name=
ns=omero.web.figure.json
version=```

This was a permissions issue.

In our environment I had to send separate setOmeroGroup calls to the different classes, a more permissive group setting to grab IDs from different users and a more selective group to write new annotations (OMERO.Figures) to my account.

getObject() required SERVICE_OPTS.setOmeroGroup(-1)
createFileAnnfromLocalFile() required SERVICE_OPTS.setOmeroGroup(omero_tools.project_gid)

Glad you figured it out Josh, you got there just before me.