Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Unable to use jgf translator #127

Open
nbargnesi opened this issue Jun 21, 2016 · 3 comments
Open

Unable to use jgf translator #127

nbargnesi opened this issue Jun 21, 2016 · 3 comments

Comments

@nbargnesi
Copy link
Member

~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:14:in `block in read': uninitialized constant BEL::Translator::Plugins::Jgf::JgfTranslator::ResourceIndex (NameError)
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:13:in `fetch'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:13:in `read'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translate.rb:52:in `translate'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/bin/bel:345:in `run'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/bin/bel:583:in `<top (required)>'
    from ~/.gem/ruby/2.2.0/bin/bel:23:in `load'
    from ~/.gem/ruby/2.2.0/bin/bel:23:in `<main>'  

Using the recently published version of bel and bel_parser:

$ gem list

*** LOCAL GEMS ***

bel (1.0.1)
bel_parser (1.0.5)
@nbargnesi nbargnesi added the bug label Jun 21, 2016
nbargnesi pushed a commit that referenced this issue Jun 21, 2016
@nbargnesi
Copy link
Member Author

New issue now.

~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/script.rb:54141:in `each': uninitialized constant BEL::Nanopub::Statement (NameError)
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:91:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:91:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:91:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:91:in `first'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:91:in `block in unwrap'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:76:in `map'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:76:in `unwrap' 
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:21:in `block in read' 
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/json/adapter/oj.rb:78:in `yield'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/json/adapter/oj.rb:78:in `call'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/json/adapter/oj.rb:78:in `hash_end'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/json/adapter/oj.rb:27:in `sc_parse'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/json/adapter/oj.rb:27:in `read'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/nanopub/buffering_nanopub_combiner.rb:79:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/nanopub/buffering_nanopub_combiner.rb:79:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/nanopub/buffering_nanopub_combiner.rb:79:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/nanopub/buffering_nanopub_combiner.rb:79:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/nanopub/buffering_nanopub_combiner.rb:79:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/nanopub/buffering_nanopub_combiner.rb:79:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/nanopub/buffering_nanopub_combiner.rb:79:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/nanopub/buffering_nanopub_combiner.rb:79:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/nanopub/buffering_nanopub_combiner.rb:79:in `to_a'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/nanopub/buffering_nanopub_combiner.rb:79:in `combine_references'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/nanopub/buffering_nanopub_combiner.rb:42:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel_parser-1.0.5/lib/bel/translator/plugins/bel_script/writer.rb:78:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel_parser-1.0.5/lib/bel/translator/plugins/bel_script/translator.rb:25:in `write'

nbargnesi pushed a commit that referenced this issue Jun 21, 2016
@nbargnesi
Copy link
Member Author

nbargnesi commented Jun 21, 2016

Assuming I have a sane ragel incantation to create lib/bel/script.rb (see #128) , new issue is:

~/.gem/ruby/2.2.0/gems/bel_parser-1.0.5/lib/bel_parser/expression/model/statement.rb:30:in `initialize': subject: expected Term, actual NilClass (ArgumentError)
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/script.rb:121043:in `new'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/script.rb:121043:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:91:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:91:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:91:in `each'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:91:in `first'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:91:in `block in unwrap'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:76:in `map'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:76:in `unwrap'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/translator/plugins/jgf/translator.rb:21:in `block in read'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/json/adapter/oj.rb:78:in `yield'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/json/adapter/oj.rb:78:in `call'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/json/adapter/oj.rb:78:in `hash_end'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/json/adapter/oj.rb:27:in `sc_parse'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/json/adapter/oj.rb:27:in `read'
    from ~/.gem/ruby/2.2.0/gems/bel-1.0.1/lib/bel/nanopub/buffering_nanopub_combiner.rb:79:in `each'

This starts highlighting the current disconnect between bel and the BELParser::Expression::Model objects.

@abargnesi
Copy link
Member

abargnesi commented Jun 21, 2016

Opened #129 to handle the disconnect between the parsers. My plan is to replace calls to BEL::Script.parse with BELParser::Expression.parse.

Should have something by today in a PR for you @nbargnesi.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants