Scidb-Py + shim cant get it to work


#1

Hello,

I built and installed shim ( from source ). I am trying to get the python shell to work but cant. scidb is running and I am able to do AFL commands but when I try to run the python examples, I see :

SCIDB_SE_NETWORK::SCIDB_LE_CANT_SEND_RECEIV
Here is my python trace:


import numpy as np
from scidbpy import interface, SciDBQueryError, SciDBArray
sdb = interface.SciDBShimInterface('http://localhost:8080')
X = np.random.random((5, 4))
Xsdb = sdb.from_array(X)

.....


   raise Error("[HTTP {0}] {1}".format(e.code, e.read()))
scidbpy.errors.SciDBQueryError: [HTTP 500] SystemException in file: src/network/BaseConnection.h function: receive line: 294
Error id: scidb::SCIDB_SE_NETWORK::SCIDB_LE_CANT_SEND_RECEIVE
Error description: Network error. Cannot send or receive network messages.

System Exception seems to indicate shim is not happy but I moseyed on to localhost:8080/api.html and shim is running. I went to the SCIDB tab and it asks me to start the scidb server although it is running. So what gives?

/var/lib/shim/conf is :

auth=login
#ports=8080,8083s
#scidbport=1239
tmp=/tmp
user=local

I see some postings on the scidbR forum with the same error. I am using scidb 13.12.1 and SciDB-Py 0.2. Does anybody have similar problems. My data analysis and plotting functions run in python hence I would prefer to use the python shell directly instead of having to exec scidb queries using aql or afl using exec.

Any help or pointers would be appreciated. Thank you in advance.

Meta question: Why so many moving parts for the python interface? I was expecting a python interface that would directly connect to scidb much like the iquery shell and allow me to do python rather than having to go through a HTTP protocol converter to talk to python. The HTTP protocol converter itself is a nice idea as it gives you a REST interface to scidb but it surely complicates installation and operation for the common use case.

Thank you.

Ranga


#2

Hi,

I think that you might have SciDB compiled in DEBUG build type. There is a known bug with a ticket about that against SciDB that affects C api clients like shim causing just the problem you’re reporting.

Until we get that fixed, only use shim with SciDB in RelWithDebInfo or Release build types. (See the run.py help during compilation or use the RPMs or deb compiled packages).

Best,

Bryan