On Wed, Jan 21, 2015 at 6:48 PM, Marc-Antoine Parent <
mapa...@acm.org> wrote:
> Hello, Daniele!
>
> Out of curiosity, which driver are you using?
> In my odbc.ini, I have
> Driver = /usr/local/virtuoso-opensource/lib/virtodbcu_r.so
> location does not matter, but I think using the « ...u_r.so » version might
> matter.
That seems to solve the segfault yes. Connection fails but at least in
a clean way. I'll try to debug it more as soon as I'll be able to take
a look at Virtuoso again: for a while I'll be busy with other aspects
of the project.
By the way, connection fails in a silent way, only with an error
logged in the python logger, hence swallowed if no handler is
configured.
In [1]: import logging
In [2]: logging.basicConfig()
....
In [6]: store = Virtuoso("DSN=VOS;UID=dba;PWD=***;WideAsUTF16=Y")
ERROR:virtuoso.vstore:Virtuoso Connection Failed:
Traceback (most recent call last):
File "/home/piro/src/rdfgambit/env/lib/python2.7/site-packages/virtuoso-0.12.6-py2.7.egg/virtuoso/vstore.py",
line 118, in open
self._connection = pyodbc.connect(dsn)
Error: ('2', '[2] [unixODBC][ (-1) (SQLDriverConnectW)')
Not a big deal but not even the most idiomatic way to fail.
Well, in this case there is a lot of out of date information still
flying around. Your project docs as well as the PyPI page and the
project readme point to this blog article:
http://river.styx.org/ww/2010/10/pyodbc-spasql/index
which suggests to patch pyodbc version 2.1.8.
Further googling led me to download the package:
http://river.styx.org/ww/2010/10/pyodbc-spasql/pyodbc-virtuoso-2.1.9-beta14.tar.gz
I haven't found anywhere else the hint that the best version is the
one from your github branch (from the readme it seems the two
solutions seem equivalent): you may well kill any reference to the
2010 article and amend it to the most up-to-date instructions.
> I had used it with virtuoso 6.something, and it should still work, but I
> advise against it. A lot of the sparql 1.1 stuff is in 7 only, and I
> recommend the current HEAD, or at least 7.1 (7.0 was a nightmare.) It seems
> the next version (7.2?) will be out any day now.
Thank you very much for this bit of information too. I went for the
lazy road of using the packaged version to try at least to connect and
communicate with it, but should I start needing it for a more serious
usage I'll definitely switch to 7.1 or whatever the current version
is.
Cheers,
-- Daniele