Page 2 of 9

Re: combining TIFF and CSV file with metadata

PostPosted: Thu Apr 19, 2012 8:38 am
by wmoore
Hi,

It's probable that you've failed to get a connection to the server.

If you print the result of the conn.connect() line,

Code: Select all
print conn.connect()


You'll probably see that this is False (will return True if you connect OK)

You need to check your username, password etc.

If you can look at the logs on the server you're trying to connect to, this may give you some idea what the problem is (if there's nothing there atall, you probably have the wrong host name).
E.g.
Code: Select all
$ cd dist
$ tail -f var/log/Blitz-0.log


You can also try connecting via the command line interface (CLI). If this works OK then you'll know that your username, password and server (host) are correct.
Code: Select all
$ cd dist
$ bin/omero login
Previously logged in to localhost:4064 as will
Server: [localhost]
Username: [will]
Password:
Created session b9451694-c1a1-44f4-a9d0-b4156d925bcc (will@localhost:4064). Idle timeout: 10.0 min. Current group: Swedlow lab


Are you running your python code on the same machine as the server ('localhost')? In the commands above, looking at the logs is on the server machine, whereas CLI login can be on a different machine (just need Server: to point to the right location).

You don't need to change OMERO version, but you do need to be sure that the 'client' and 'server' versions match. Again, if you're connecting to 'localhost' server then they will always be the same, but if connecting to a remote server you need to know that your local and remote versions match.

Hope I haven't confused you too much? If you see any logs that might be useful, paste them here.

Will.

Re: combining TIFF and CSV file with metadata

PostPosted: Thu Apr 19, 2012 9:06 am
by Thorondor
after checking all the things, I checked username and pw for like 10th time and of course the pw was wrong. :roll:

now I get:
Traceback (most recent call last):
File "tables.py", line 51, in ?
table.initialize(columns)
AttributeError: 'NoneType' object has no attribute 'initialize'

I assume this should not show up?

Re: combining TIFF and CSV file with metadata

PostPosted: Thu Apr 19, 2012 9:37 am
by jmoore
Can you show us your whole, current example? It'd good to be able to see what line 51 is. Thanks.
~J.

Re: combining TIFF and CSV file with metadata

PostPosted: Thu Apr 19, 2012 10:17 am
by Thorondor
of course, it is just the exampled from the link you provided to me. I hoped getting this to work will give me more insight how I will proceed with my task:

Code: Select all
     47 # Create and initialize a new table.
     48 # =================================================================
     49 repositoryId = 1
     50 table = conn.c.sf.sharedResources().newTable(repositoryId, tablename)
     51 table.initialize(columns)
     52 #table.initialzis(WellColumn)
     53
     54
     55 # Add data to the table.
     56 # =================================================================
     57 ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
     58 strings = ["one", "two", "three", "four", "five",\
     59            "six", "seven", "eight", "nine", "ten"]
     60 data1 = omero.grid.LongColumn('Uid', 'test Long', ids)
     61 data2 = omero.grid.StringColumn('MyStringColumn', '', 64, strings)
     62 data = [data1, data2]
     63 table.addData(data)
     64 table.close()           # when we're done, close.

Re: combining TIFF and CSV file with metadata

PostPosted: Thu Apr 19, 2012 10:36 am
by jmoore
Ah, thanks. Then the table that was returned is null, which means your Table service is almost certainly not running. Can you show us the contents of var/log/Tables-0.log? Likely, one of hdf5, numpy, numexpr, or tables is missing.

Cheers,
~Josh

Re: combining TIFF and CSV file with metadata

PostPosted: Fri Apr 20, 2012 7:21 am
by Thorondor
Code: Select all
* Found numpy 1.6.1 package installed.
* Found numexpr 1.4.2 package installed.
* Found Cython 0.15.1 package installed.
* Found HDF5 headers at ``/usr/local/hdf5/include``, library at ``/usr/local/hdf5/lib``.
* Could not find LZO 2 headers and library; disabling support for it.
* Could not find LZO 1 headers and library; disabling support for it.
* Could not find bzip2 headers and library; disabling support for it.
cythoning tables/linkExtension.pyx to tables/linkExtension.c
running install
running build
running build_py
running build_ext
building 'tables.linkExtension' extension
C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC

compile options: '-DNDEBUG=1 -Iblosc -I/usr/lib64/python2.4/site-packages/numpy/core/include -I/usr/local/hdf5/include -I/usr/include/python2.4 -c'
extra options: '-Isrc -DH5_USE_16_API'
gcc: tables/linkExtension.c
tables/linkExtension.c: In function ‘__pyx_pf_6tables_13linkExtension_12ExternalLink_1_g_open’:
tables/linkExtension.c:1869: warning: passing argument 4 of ‘H5Lunpack_elink_val’ from incompatible pointer type
tables/linkExtension.c:1869: warning: passing argument 5 of ‘H5Lunpack_elink_val’ from incompatible pointer type
tables/linkExtension.c: At top level:
/usr/lib64/python2.4/site-packages/numpy/core/include/numpy/__multiarray_api.h:1533: warning: ‘_import_array’ defined but not used
gcc -pthread -shared build/temp.linux-x86_64-2.4/tables/linkExtension.o -L/usr/local/hdf5/lib -lhdf5 -o build/lib.linux-x86_64-2.4/tables/linkExtension.so
running build_scripts
running install_lib
copying build/lib.linux-x86_64-2.4/tables/linkExtension.so -> /usr/lib64/python2.4/site-packages/tables
running install_scripts
changing mode of /usr/bin/ptdump to 755
changing mode of /usr/bin/nctoh5 to 755
changing mode of /usr/bin/ptrepack to 755


seems to work, I mean the installation, or do I miss something e.g. setting PATH variable?
I still get the same message. :-/

Re: combining TIFF and CSV file with metadata

PostPosted: Fri Apr 20, 2012 7:34 am
by jmoore
This looks like the install log for pytables. Is there a file under your OMERO directory named "var/log/Tables-0.log"? You might also show us the output of:

Code: Select all
bin/omero admin diagnostics


Cheers,
~Josh

Re: combining TIFF and CSV file with metadata

PostPosted: Fri Apr 20, 2012 8:42 am
by Thorondor
ok, I got something wrong there. So pytables is working and omero server is running and omero is installed, does this not include omero tables?

under:
/data/applications/OMERO.server-Beta-4.3.4/include/omero
there is a Tables.h and Tables.ice

what else I need to do that omero tables is running? I am a bit confused.

Re: combining TIFF and CSV file with metadata

PostPosted: Fri Apr 20, 2012 9:53 am
by jmoore
OMERO.tables runs in a secondary (Python) process beside the main Java service. It should be started by calling "/data/applications/OMERO.server-Beta-4.3.4/bin/omero admin start". If you could show us the output of "/data/applications/OMERO.server-Beta-4.3.4/bin/omero admin diagnostics" we'd know for sure what services have started. All the log files are under /data/applications/OMERO.server-Beta-4.3.4/var/log.

Cheers,
~Josh.

Re: combining TIFF and CSV file with metadata

PostPosted: Fri Apr 20, 2012 2:09 pm
by Thorondor
actually a new issue came up. I installed ice 3.4 and reinstallled 3.3.1 now but I still get this message when starting omero:

Code: Select all
omero admin start
Traceback (most recent call last):
  File "/data/applications/OMERO.server-Beta-4.3.4/bin/omero", line 123, in ?
    rv = omero.cli.argv()
  File "/omero/OMERO.server-Beta-4.3.4/lib/python/omero/cli.py", line 1172, in argv
  File "/omero/OMERO.server-Beta-4.3.4/lib/python/omero/cli.py", line 722, in invoke
  File "/omero/OMERO.server-Beta-4.3.4/lib/python/omero/cli.py", line 791, in onecmd
  File "/omero/OMERO.server-Beta-4.3.4/lib/python/omero/cli.py", line 871, in execute
  File "/omero/OMERO.server-Beta-4.3.4/lib/python/omero/plugins/prefs.py", line 64, in open_and_close_config
  File "/data/applications/OMERO.server-Beta-4.3.4/lib/python/omero/plugins/admin.py", line 887, in open_config
    config = omero.config.ConfigXml(str(cfg_xml))
  File "/omero/OMERO.server-Beta-4.3.4/lib/python/omero/config.py", line 68, in __init__
  File "/usr/lib/python2.4/site-packages/elementtree/ElementTree.py", line 960, in XML
    parser = XMLTreeBuilder()
  File "/usr/lib/python2.4/site-packages/elementtree/ElementTree.py", line 1115, in __init__
    raise ImportError(
ImportError: No module named expat; use SimpleXMLTreeBuilder instead



any clues what might be wrong?