[ome-devel] Create a new table

Etienne Dumoulin etienne at phenomic.ai
Tue May 29 18:41:48 BST 2018


Hi Omero developers,

I would like to create a new table. I followed exactly the steps given in
the python documentation
<https://docs.openmicroscopy.org/omero/5.4.6/developers/Python.html#omero-tables>.
I use the current version of omero (5.4.6).

Here is the my minimal code snippet:

*#############################################################*

*table_name = "myrandomname"*








*columns = [omero.grid.LongColumn('col1', 'col test', [1,2,3])]resources =
conn.c.sf.sharedResources()repository_id =
resources.repositories().descriptions[0].getId().getValue()table =
resources.newTable(repository_id,
table_name)table.initialize(columns)table.addData(columns)table.close()#############################################################*

*AttributeError: 'NoneType' object has no attribute 'initialize'*The error
is quite clear, *resources.newTable* returns None. However, I am not too
sure what I should do to fix it.

Also it seems a record is created in the originalfile database table every
time I run this code.

Thank you for your patience.

Regards,

Etienne


-- 
Etienne Dumoulin
PhenomicAI
Lead software engineer
+1 (416)-471-8323
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20180529/db5a9c10/attachment.html>


More information about the ome-devel mailing list