BDB::Fatal error from WordNet

J

Jason Fr

I've got a ruby script that calls Ruby-WordNet which in turns calls DBD.
I'm getting an error from DBD that looks like this (there's some debug
output from wordnet's lexicon.rb that I turned on):

$ sh run_everything.sh
Tue Oct 20 03:19:59 EDT 2009
------ now running determine_features.rb
Mode is: 71571
Mode is: 0444
Using readonly flags
Env flags are: 10000000000000000000, dbflags are 0
EnvOptions: {:set_timeout=>50, :set_lk_detect=>1, :set_verbose=>true}
/usr/local/lib/site_ruby/1.8/wordnet/lexicon.rb:121:in `initialize':
Error while opening Ruby-WordNet data files: /usr/share/ruby-wordnet:
Invalid argument (BDB::Fatal)
from /usr/local/lib/site_ruby/1.8/wordnet/lexicon.rb:121:in
`new'
from /usr/local/lib/site_ruby/1.8/wordnet/lexicon.rb:121:in
`initialize'
from ./encoder_tools.rb:145:in `new'
from ./encoder_tools.rb:145:in `initialize'
from ./determine_features.rb:32:in `new'
from ./determine_features.rb:32

The actual line in lexicon.rb that causes this error is:

@env = BDB::Env::new( dbenv, envflags, EnvOptions )

What I can't figure out is which argument here is invalid, or otherwise
what's going wrong.

Possibly useful info: I've successfully built and installed bdb-0.6.5
from source- that's the one I want to be running. However I also have
the libdb4.6-ruby1.8 package installed on the same machine (and
according to apt-cache showpkg it's using 0.6.2-0ubuntu1). So I'm
unclear which actual lib I'm using when this error happens.

Does anyone have any ideas about how to get past this?

Thanks in advance for any and all advice.

Cheers,
-Jason
 
M

Michael Granger

[Note: parts of this message were removed to make it a legal post.]

I've got a ruby script that calls Ruby-WordNet which in turns calls
DBD.
I'm getting an error from DBD that looks like this (there's some debug
output from wordnet's lexicon.rb that I turned on):

$ sh run_everything.sh
Tue Oct 20 03:19:59 EDT 2009
------ now running determine_features.rb
Mode is: 71571
Mode is: 0444
Using readonly flags
Env flags are: 10000000000000000000, dbflags are 0
EnvOptions: {:set_timeout=>50, :set_lk_detect=>1, :set_verbose=>true}
/usr/local/lib/site_ruby/1.8/wordnet/lexicon.rb:121:in `initialize':
Error while opening Ruby-WordNet data files: /usr/share/ruby-wordnet:
Invalid argument (BDB::Fatal)
from /usr/local/lib/site_ruby/1.8/wordnet/lexicon.rb:121:in
`new'
from /usr/local/lib/site_ruby/1.8/wordnet/lexicon.rb:121:in
`initialize'
from ./encoder_tools.rb:145:in `new'
from ./encoder_tools.rb:145:in `initialize'
from ./determine_features.rb:32:in `new'
from ./determine_features.rb:32

The actual line in lexicon.rb that causes this error is:

@env = BDB::Env::new( dbenv, envflags, EnvOptions )

What I can't figure out is which argument here is invalid, or
otherwise
what's going wrong.

This is happening because the first argument to BDB::Env.new is a
database directory, and you've given it a directory without a
database. You'll need to build the Wordnet database using the included
'convertdb.rb' script and copy the resulting directory to /usr/share/
ruby-wordnet, then you should be set.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,260
Messages
2,571,038
Members
48,768
Latest member
first4landlord

Latest Threads

Top