<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Etienne,
<div class=""><br class="">
</div>
<div class=""> This is probably due to missing in incomplete installation of PyTables dependencies on your server.</div>
<div class=""><br class="">
</div>
<div class="">This should be included in the server install steps. For example, on CentOs 7 (<a href="https://docs.openmicroscopy.org/omero/5.4.6/sysadmins/unix/server-centos7-ice36.html" class="">https://docs.openmicroscopy.org/omero/5.4.6/sysadmins/unix/server-centos7-ice36.html</a>)</div>
<div class="">we install PyTables on this line:</div>
<div class="">
<pre style="overflow-x: auto; overflow-y: hidden; padding: 5px; background-color: rgb(236, 239, 241); color: rgb(69, 90, 100); line-height: 15.6px; border-top-width: 1px; border-style: solid none; border-top-color: rgb(170, 204, 153); border-bottom-width: 1px; border-bottom-color: rgb(170, 204, 153); orphans: 2; widows: 2;" class=""><span class="n">yum</span> <span class="o" style="color: rgb(102, 102, 102);">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">python</span><span class="o" style="color: rgb(102, 102, 102);">-</span><span class="p">{</span><span class="n">pip</span><span class="p">,</span><span class="n">devel</span><span class="p">,</span><span class="n">virtualenv</span><span class="p">,</span><span class="n">yaml</span><span class="p">,</span><span class="n">jinja2</span><span class="p">,</span><span class="n">tables</span><span class="p">}</span></pre>
<div class=""><br class="">
</div>
</div>
<div class="">If you have access to the server machine, you can test that PyTables are working with examples from:</div>
<div class=""><a href="https://www.pytables.org/usersguide/tutorials.html" class="">https://www.pytables.org/usersguide/tutorials.html</a></div>
<div class=""><br class="">
</div>
<div class="">E.g. this should work without errors:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class="">
$ python</div>
<div style="margin: 0px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class="">
>>> from tables import *</div>
<div style="margin: 0px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class="">
>>> class Particle(IsDescription):</div>
<div style="margin: 0px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class="">
...     name      = StringCol(16)</div>
<div style="margin: 0px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class="">
... </div>
<div style="margin: 0px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class="">
>>> h5file = open_file("tutorial1.h5", mode="w", title="Test file")</div>
<div style="margin: 0px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class="">
>>> group = h5file.create_group("/", 'detector', 'Detector information')</div>
<div style="margin: 0px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class="">
>>> table = h5file.create_table(group, 'readout', Particle, "Readout example")</div>
</div>
<div class=""><br class="">
</div>
<div class="">Hope that helps you to track down the problem,</div>
<div class=""><br class="">
</div>
<div class=""> Regards,</div>
<div class=""><br class="">
</div>
<div class="">   Will.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 29 May 2018, at 18:41, Etienne Dumoulin <<a href="mailto:etienne@phenomic.ai" class="">etienne@phenomic.ai</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hi Omero developers,<br clear="all" class="">
<div class=""><br class="">
</div>
<div class="">I would like to create a new table. I followed exactly the steps given in the
<a href="https://docs.openmicroscopy.org/omero/5.4.6/developers/Python.html#omero-tables" class="">
python documentation</a>. I use the current version of omero (5.4.6).<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Here is the my minimal code snippet:</div>
<div class=""><i class="">#############################################################<br class="">
</i></div>
<div class=""><i class="">table_name = "myrandomname"<br class="">
</i></div>
<div class=""><i class="">columns = [omero.grid.LongColumn('col1', 'col test', [1,2,3])]<br class="">
<br class="">
resources = conn.c.sf.sharedResources()<br class="">
repository_id = resources.repositories().descriptions[0].getId().getValue()<br class="">
table = resources.newTable(repository_id, table_name)<br class="">
table.initialize(columns)<br class="">
table.addData(columns)<br class="">
table.close()
<div class=""><i class="">#############################################################</i></div>
<br class="">
</i></div>
<div class=""><i class="">
<pre class=""><span class="gmail-ansi-red-fg">AttributeError</span>: 'NoneType' object has no attribute 'initialize'</pre>
</i>The error is quite clear, <i class="">resources.newTable</i> returns None. However, I am not too sure what I should do to fix it.</div>
<div class=""><br class="">
</div>
<div class="">Also it seems a record is created in the originalfile database table every time I run this code.<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Thank you for your patience.</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class=""><br class="">
</div>
<div class="">Etienne<br class="">
</div>
<div class=""><i class=""></i></div>
<div class=""><i class=""><br class="">
</i></div>
<div class=""><br class="">
-- <br class="">
<div class="gmail_signature">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">Etienne Dumoulin</div>
<div class="">PhenomicAI</div>
<div class="">Lead software engineer</div>
<div class="">+1 (416)-471-8323<br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
ome-devel mailing list<br class="">
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" class="">ome-devel@lists.openmicroscopy.org.uk</a><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>