List Info

Thread: Problem with Resource.find_all and DBpedia dataset




Problem with Resource.find_all and DBpedia dataset
country flaguser name
United Kingdom
2008-04-10 13:24:34
Hi,

I'm trying to use the DBPedia dataset with active_rdf and
I'm finding 
that the following code fails: :

#!/usr/bin/ruby

require 'time'
require 'rubygems'
require 'net/http'
require 'active_rdf'

pool = ConnectionPool.add_data_source :type => :sparql,
:url => 
"http://dbpedia.org/sp
arql", :results => :sparql_xml,  :engine =>
:joseki
Namespace.register(:dbpedia, 'http://dbpedia.org/')
ObjectManager.construct_classes
DBPEDIA::Resource.find_all


roblfry:~/src$ ./active_rdf_test.rb
/usr/lib/ruby/gems/1.8/gems/activerdf-1.6.9/lib/active_rdf/o
bjectmanager/object_manager.rb:69:in 
`const_defined?': wrong constant name 1000011506
(NameError)
         from 
/usr/lib/ruby/gems/1.8/gems/activerdf-1.6.9/lib/active_rdf/o
bjectmanager/object_manager.rb:69:in 
`construct_class'
         from 
/usr/lib/ruby/gems/1.8/gems/activerdf-1.6.9/lib/active_rdf/o
bjectmanager/object_manager.rb:34:in 
`construct_classes'
         from 
/usr/lib/ruby/gems/1.8/gems/activerdf-1.6.9/lib/active_rdf/o
bjectmanager/object_manager.rb:34:in 
`collect'
         from 
/usr/lib/ruby/gems/1.8/gems/activerdf-1.6.9/lib/active_rdf/o
bjectmanager/object_manager.rb:34:in 
`construct_classes'
         from ./active_rdf_test.rb:10


I think this is a problem with the DBpedia dataset rather
than active_rdf ?

I'd like to report it back to the DBpedia project if so,
although I'm a 
little unsure of how to go about finding the nature of the
error - if 
someone could give me a pointer or two it would be much
appreciated.

Thanks,

Rob
_______________________________________________
ActiveRDF mailing list
ActiveRDFlists.deri.org
http
://lists.deri.org/mailman/listinfo/activerdf

Problem getting SIOC EX source
country flaguser name
United States
2008-04-10 18:28:20
Hi,

I want to download the SIOC EX source as a step toward
better
understanding ActiveRDF.

I've installed both python 2.5 and python 2.4 and the
corresponding
versions of bzr on my Windows XP laptop, but have had no
success
fetching the code.

First behind my company's firewall, I tried but could not
bring back the
source with my http_proxy env set to http://FULL_PROXY_PATH:8
080. Then I
tried from home with no proxy and received the timeout
errors listed
below after a few minutes.

Any help would be appreciated,

Robert

PS Here is the trace back from home (I had the same problem
with Python
2.5.X and the newer bzr)

bzr branch lp:sioc-ex

bzr: ERROR: socket.error: (10060, 'Operation timed out')

Traceback (most recent call last):
  File
"C:Python24Libsite-packagesbzrlibcommands.py"
, line 834, in
run_bzr_catch_errors
    return run_bzr(argv)
  File
"C:Python24Libsite-packagesbzrlibcommands.py"
, line 790, in
run_bzr
    ret = run(*run_argv)
  File
"C:Python24Libsite-packagesbzrlibcommands.py"
, line 492, in
run_argv_aliases
    return self.run(**all_cmd_args)
  File
"C:Python24Libsite-packagesbzrlibbuiltins.py"
, line 896, in
run
    accelerator_tree, br_from =
bzrdir.BzrDir.open_tree_or_branch(
  File
"C:Python24Libsite-packagesbzrlibbzrdir.py",
line 773, in
open_tree_or_branch
    bzrdir = klass.open(location)
  File
"C:Python24Libsite-packagesbzrlibbzrdir.py",
line 650, in
open
    t = get_transport(base,
possible_transports=possible_transports)
  File
"C:Python24Libsite-packagesbzrliblazy_import.py&qu
ot;, line 125,
in __call__
    return obj(*args, **kwargs)
  File
"C:Python24Libsite-packagesbzrlibtransport__init_
_.py",
line 1576, in get_transport
    base = directories.dereference(base)
  File
"C:Python24Libsite-packagesbzrlibdirectory_service
.py", line
52, in dereference
    return service().look_up(name, url)
  File
"C:Python24Libsite-packagesbzrlibpluginslaunchpad
lp_directory.py"
, line 60, in look_up
    return self._resolve(url)
  File
"C:Python24Libsite-packagesbzrlibpluginslaunchpad
lp_directory.py"
, line 76, in _resolve
    result = resolve.submit(service)
  File
"C:Python24Libsite-packagesbzrlibpluginslaunchpad
lp_registration.
py", line 180, in submit
    self._authenticated)
  File
"C:Python24Libsite-packagesbzrlibpluginslaunchpad
lp_registration.
py", line 145, in send_request
    result = method(*method_params)
  File "c:Python24libxmlrpclib.py", line 1096,
in __call__
    return self.__send(self.__name, args)
  File "c:Python24libxmlrpclib.py", line 1383,
in __request
    verbose=self.__verbose
  File "c:Python24libxmlrpclib.py", line 1129,
in request
    self.send_content(h, request_body)
  File "c:Python24libxmlrpclib.py", line 1243,
in send_content
    connection.endheaders()
  File "c:Python24libhttplib.py", line 798, in
endheaders
    self._send_output()
  File "c:Python24libhttplib.py", line 679, in
_send_output
    self.send(msg)
  File "c:Python24libhttplib.py", line 646, in
send
    self.connect()
  File "c:Python24libhttplib.py", line 1072, in
connect
    sock.connect((self.host, self.port))
  File "<string>", line 1, in connect
error: (10060, 'Operation timed out')

bzr 1.3 on python 2.4.4.final.0 (win32)
arguments: ['C:\Python24\Scripts\bzr', 'branch',
'lp:sioc-ex']

_______________________________________________
ActiveRDF mailing list
ActiveRDFlists.deri.org
http
://lists.deri.org/mailman/listinfo/activerdf

Re: Problem getting SIOC EX source
user name
2008-04-10 19:54:45
Hi Robert,

As an alternative you can try:
bzr branch 
http://bazaar.launchpad.net/~sioc-team/sioc-ex/trunk

This commandline is mentioned here:
h
ttps://code.launchpad.net/~sioc-team/sioc-ex/trunk

Benjamin had a snapshot archive of the SIOC-Ex on the web at
some
point, which would help you avoid bzr errors altogether, but
I can not
find a URL for it now.

Uldis

[ http://captsolo.net/info/ ]

On Fri, Apr 11, 2008 at 12:28 AM, Ehrick, Robert O
<robert.o.ehricklmco.com> wrote:
> Hi,
>
>  I want to download the SIOC EX source as a step toward
better
>  understanding ActiveRDF.
>
>  I've installed both python 2.5 and python 2.4 and the
corresponding
>  versions of bzr on my Windows XP laptop, but have had
no success
>  fetching the code.
>
>  First behind my company's firewall, I tried but could
not bring back the
>  source with my http_proxy env set to http://FULL_PROXY_PATH:8
080. Then I
>  tried from home with no proxy and received the timeout
errors listed
>  below after a few minutes.
>
>  Any help would be appreciated,
>
>  Robert
>
>  PS Here is the trace back from home (I had the same
problem with Python
>  2.5.X and the newer bzr)
>
>  bzr branch lp:sioc-ex
>
>  bzr: ERROR: socket.error: (10060, 'Operation timed
out')
>
>  Traceback (most recent call last):
>   File
"C:Python24Libsite-packagesbzrlibcommands.py"
, line 834, in
>  run_bzr_catch_errors
>     return run_bzr(argv)
>   File
"C:Python24Libsite-packagesbzrlibcommands.py"
, line 790, in
>  run_bzr
>     ret = run(*run_argv)
>   File
"C:Python24Libsite-packagesbzrlibcommands.py"
, line 492, in
>  run_argv_aliases
>     return self.run(**all_cmd_args)
>   File
"C:Python24Libsite-packagesbzrlibbuiltins.py"
, line 896, in
>  run
>     accelerator_tree, br_from =
bzrdir.BzrDir.open_tree_or_branch(
>   File
"C:Python24Libsite-packagesbzrlibbzrdir.py",
line 773, in
>  open_tree_or_branch
>     bzrdir = klass.open(location)
>   File
"C:Python24Libsite-packagesbzrlibbzrdir.py",
line 650, in
>  open
>     t = get_transport(base,
possible_transports=possible_transports)
>   File
"C:Python24Libsite-packagesbzrliblazy_import.py&qu
ot;, line 125,
>  in __call__
>     return obj(*args, **kwargs)
>   File
"C:Python24Libsite-packagesbzrlibtransport__init_
_.py",
>  line 1576, in get_transport
>     base = directories.dereference(base)
>   File
"C:Python24Libsite-packagesbzrlibdirectory_service
.py", line
>  52, in dereference
>     return service().look_up(name, url)
>   File
> 
"C:Python24Libsite-packagesbzrlibpluginslaunchpad
lp_directory.py"
>  , line 60, in look_up
>     return self._resolve(url)
>   File
> 
"C:Python24Libsite-packagesbzrlibpluginslaunchpad
lp_directory.py"
>  , line 76, in _resolve
>     result = resolve.submit(service)
>   File
> 
"C:Python24Libsite-packagesbzrlibpluginslaunchpad
lp_registration.
>  py", line 180, in submit
>     self._authenticated)
>   File
> 
"C:Python24Libsite-packagesbzrlibpluginslaunchpad
lp_registration.
>  py", line 145, in send_request
>     result = method(*method_params)
>   File "c:Python24libxmlrpclib.py", line
1096, in __call__
>     return self.__send(self.__name, args)
>   File "c:Python24libxmlrpclib.py", line
1383, in __request
>     verbose=self.__verbose
>   File "c:Python24libxmlrpclib.py", line
1129, in request
>     self.send_content(h, request_body)
>   File "c:Python24libxmlrpclib.py", line
1243, in send_content
>     connection.endheaders()
>   File "c:Python24libhttplib.py", line
798, in endheaders
>     self._send_output()
>   File "c:Python24libhttplib.py", line
679, in _send_output
>     self.send(msg)
>   File "c:Python24libhttplib.py", line
646, in send
>     self.connect()
>   File "c:Python24libhttplib.py", line
1072, in connect
>     sock.connect((self.host, self.port))
>   File "<string>", line 1, in connect
>  error: (10060, 'Operation timed out')
>
>  bzr 1.3 on python 2.4.4.final.0 (win32)
>  arguments: ['C:\Python24\Scripts\bzr', 'branch',
'lp:sioc-ex']
>
>  _______________________________________________
>  ActiveRDF mailing list
>  ActiveRDFlists.deri.org
>  http
://lists.deri.org/mailman/listinfo/activerdf
>
_______________________________________________
ActiveRDF mailing list
ActiveRDFlists.deri.org
http
://lists.deri.org/mailman/listinfo/activerdf

Re: Problem with Resource.find_all and DBpedia dataset
country flaguser name
Netherlands
2008-04-11 08:46:02
On 04/10/08/04/08 19:24 +0100, robl wrote:
> Hi,
>
> I'm trying to use the DBPedia dataset with active_rdf
and I'm finding  
> that the following code fails: :
>
> #!/usr/bin/ruby
>
> require 'time'
> require 'rubygems'
> require 'net/http'
> require 'active_rdf'
>
> pool = ConnectionPool.add_data_source :type =>
:sparql, :url =>  
> "http://dbpedia.org/sp
arql", :results => :sparql_xml,  :engine =>
:joseki
> Namespace.register(:dbpedia, 'http://dbpedia.org/')
> ObjectManager.construct_classes
> DBPEDIA::Resource.find_all
Two quick (incomplete) answers, rest can follow later:
- don't do ObjectManager.construct_classes
- but it still doesn't work, probably because dbpedia
(Virtuoso) rejects 
   too expensive queries. they will fail with HTTP 500 (you
can see this in 
the ActiveRDF log). For example, this works:

ConnectionPool.add_data_source(:type => :sparql, :url
=> "http://dbpedia.org/sp
arql", :engine => :virtuoso)
puts Query.new.select(:s).where(:s,:p,.limit(20).
execute

But changing 'select' into 'distinct' will fail, because the
query planner 
thinks the query will be too expensive. Now, that might be
the reason that
DBPEDIA::Resource.find_all doesn't work, but it might also
be something 
else (I don't know yet). But in general, querying dbpedia
should work.


  -eyal
_______________________________________________
ActiveRDF mailing list
ActiveRDFlists.deri.org
http
://lists.deri.org/mailman/listinfo/activerdf

Re: Problem getting SIOC EX source
country flaguser name
Netherlands
2008-04-11 08:34:27
On 04/10/08/04/08 18:28 -0500, Ehrick, Robert O wrote:
>Hi,
>
>I want to download the SIOC EX source as a step toward
better
>understanding ActiveRDF.
>
>I've installed both python 2.5 and python 2.4 and the
corresponding
>versions of bzr on my Windows XP laptop, but have had no
success
>fetching the code.
>
>First behind my company's firewall, I tried but could
not bring back the
>source with my http_proxy env set to http://FULL_PROXY_PATH:8
080. Then I
>tried from home with no proxy and received the timeout
errors listed
>below after a few minutes.
It seems like some network communication problem on your
machine, but I 
don't know what exactly. Maybe you can ask on the bzr
mailing list or look 
in the documentation/IRC/FAQ [1]?  I'm sure someone will be
able to help 
you there.

  -eyal

[1] http://bazaar-vcs.or
g/BzrSupport
_______________________________________________
ActiveRDF mailing list
ActiveRDFlists.deri.org
http
://lists.deri.org/mailman/listinfo/activerdf

Re: Problem with Resource.find_all and DBpedia dataset
country flaguser name
United Kingdom
2008-04-26 03:57:34
Eyal Oren wrote:
> On 04/10/08/04/08 19:24 +0100, robl wrote:
>> Hi,
>>
>> I'm trying to use the DBPedia dataset with
active_rdf and I'm finding  
>> that the following code fails: :
>>
>> #!/usr/bin/ruby
>>
>> require 'time'
>> require 'rubygems'
>> require 'net/http'
>> require 'active_rdf'
>>
>> pool = ConnectionPool.add_data_source :type =>
:sparql, :url =>  
>> "http://dbpedia.org/sp
arql", :results => :sparql_xml,  :engine =>
:joseki
>> Namespace.register(:dbpedia, 'http://dbpedia.org/')
>> ObjectManager.construct_classes
>> DBPEDIA::Resource.find_all
> Two quick (incomplete) answers, rest can follow later:
> - don't do ObjectManager.construct_classes

Is this in this specific example or a more general
recommendation for 
active_rdf ?

> - but it still doesn't work, probably because dbpedia
(Virtuoso) rejects 
>   too expensive queries. they will fail with HTTP 500
(you can see this 
> in the ActiveRDF log). For example, this works:
> 
> ConnectionPool.add_data_source(:type => :sparql,
:url => 
> "http://dbpedia.org/sp
arql", :engine => :virtuoso)
> puts Query.new.select(:s).where(:s,:p,.limit(20).
execute
> 
> But changing 'select' into 'distinct' will fail,
because the query 
> planner thinks the query will be too expensive. Now,
that might be the 
> reason that
> DBPEDIA::Resource.find_all doesn't work, but it might
also be something 
> else (I don't know yet). But in general, querying
dbpedia should work.
> 
> 
>  -eyal
> _______________________________________________
> ActiveRDF mailing list
> ActiveRDFlists.deri.org
> http
://lists.deri.org/mailman/listinfo/activerdf

_______________________________________________
ActiveRDF mailing list
ActiveRDFlists.deri.org
http
://lists.deri.org/mailman/listinfo/activerdf

Re: Problem with Resource.find_all and DBpedia dataset
country flaguser name
Netherlands
2008-04-26 06:44:43
On 04/26/08/04/08 09:57 +0100, robl wrote:
>> - don't do ObjectManager.construct_classes
> Is this in this specific example or a more general
recommendation for  
> active_rdf ?
A general recommendation. It was necessary before, but
(almost) never 
anymore. I'm still planning to ensure it's really not needed
and remove it, 
but haven't gotten to that yet. But in most common
scenario's you don't 
need it (and save time not doing it).

  -eyal
_______________________________________________
ActiveRDF mailing list
ActiveRDFlists.deri.org
http
://lists.deri.org/mailman/listinfo/activerdf

[1-7]

about | contact  Other archives ( Real Estate discussion Medical topics )