Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: undefined method `strip' #560

Closed
Intelligent2013 opened this issue Feb 17, 2024 · 1 comment
Closed

Error: undefined method `strip' #560

Intelligent2013 opened this issue Feb 17, 2024 · 1 comment
Assignees
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@Intelligent2013
Copy link
Contributor

Source issue: metanorma/mn-native-pdf#645

Error occurs on UN documents from the repository mn-samples-un.

bundle exec metanorma -t un -x presentation ECE_TRADE_C_CEFACT_2018_1E.adoc
Document Attributes: standard is not a legal document type: reverting to 'recommendation'
Document Attributes: standard is not a legal document type: reverting to 'recommendation'
Metanorma XML Style Warning: (ID _282f4df6-24fb-767e-3566-81a066ef5c47): Table should have title
Metanorma XML Style Warning: (ID _a7d255a4-817f-8a5c-f548-d181f95a5e75): Table should have title
Metanorma XML Style Warning: (ID _82f1cb48-0d03-1e75-7005-e454cae293a5): Table should have title
Metanorma XML Style Warning: (ID _5d5f946c-45d4-2d33-720a-b27e09c09009): Table should have title
Metanorma XML Style Warning: (ID _59e06788-dbba-c5cc-bd7f-af02aea45226): Table should have title
Metanorma XML Style Warning: (ID _f683ad17-bba0-63e9-febb-b381fea84143): Table should have title
Metanorma XML Style Warning: (ID _d8a8b916-5c68-101c-b41e-26320a5ad2b9): Table should have title
Metanorma XML Style Warning: (ID _145ffbc9-b2bd-6c01-e204-6df90421672a): Table should have title
Metanorma XML Style Warning: (ID _2fa0e038-ab70-563a-c860-744527bf9d12): Table should have title
Metanorma XML Style Warning: (ID _d82951b1-ae31-1a5a-ed56-4f2f5878c428): Table should have title
Metanorma XML Style Warning: (ID _875ffe77-db14-115e-ea66-246ab22ec8a0): Table should have title
Metanorma XML Style Warning: (ID _27dfe506-7e53-53ec-e76b-2e7974aa262b): Table should have title
C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/isodoc-4ce0738943a6/lib/isodoc/presentation_function/inline.rb:100:in `date1'
C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/isodoc-4ce0738943a6/lib/isodoc/presentation_function/inline.rb:95:in `block in date'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/nokogiri-1.15.5-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/nokogiri-1.15.5-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/nokogiri-1.15.5-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/isodoc-4ce0738943a6/lib/isodoc/presentation_function/inline.rb:94:in `date'
C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/isodoc-4ce0738943a6/lib/isodoc/presentation_xml_convert.rb:94:in `inline'
C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/isodoc-4ce0738943a6/lib/isodoc/presentation_xml_convert.rb:45:in `conversions'
C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/isodoc-4ce0738943a6/lib/isodoc/presentation_xml_convert.rb:25:in `convert1'
C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/isodoc-4ce0738943a6/lib/isodoc/convert.rb:155:in `convert'
C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/metanorma-un-58cbc2509063/lib/metanorma/un/processor.rb:47:in `output'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-1.7.0/lib/metanorma/compile.rb:170:in `process_output_unthreaded'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-1.7.0/lib/metanorma/compile.rb:156:in `process_exts1'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-1.7.0/lib/metanorma/compile.rb:130:in `process_ext'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-1.7.0/lib/metanorma/compile.rb:112:in `block in process_exts_run'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-1.7.0/lib/metanorma/compile.rb:111:in `each'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-1.7.0/lib/metanorma/compile.rb:111:in `process_exts_run'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-1.7.0/lib/metanorma/compile.rb:106:in `process_exts'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-1.7.0/lib/metanorma/compile.rb:36:in `compile'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.9.1/lib/metanorma/cli/compiler.rb:45:in `compile_file'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.9.1/lib/metanorma/cli/compiler.rb:30:in `compile'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.9.1/lib/metanorma/cli/compiler.rb:35:in `compile'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.9.1/lib/metanorma/cli/command.rb:244:in `compile_document'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.9.1/lib/metanorma/cli/command.rb:48:in `block in compile'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.9.1/lib/metanorma/cli/command.rb:48:in `each'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.9.1/lib/metanorma/cli/command.rb:48:in `compile'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/thor-hollaback-0.2.1/lib/thor/hollaback.rb:68:in `run'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.9.1/lib/metanorma/cli.rb:34:in `start'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.9.1/exe/metanorma:25:in `block in <top (required)>'
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.9.1/exe/metanorma:43:in `<top (required)>'
C:/tools/ruby31/lib/ruby/gems/3.1.0/bin/metanorma:25:in `load'
C:/tools/ruby31/lib/ruby/gems/3.1.0/bin/metanorma:25:in `<main>'
undefined method `strip' for nil:NilClass

      elem.replace(@i18n.date(elem["value"], elem["format"].strip))
                                                           ^^^^^^

How to repeat:

git clone https://github.com/metanorma/mn-samples-un
cd mn-samples-un
bundle update
cd sources
bundle exec metanorma -t un -x presentation ECE_TRADE_C_CEFACT_2018_1E.adoc 

I've tried to update Gemfile:

source "https://rubygems.org"

gem "metanorma-cli"
gem "metanorma-un", git: "https://github.com/metanorma/metanorma-un", branch: "main"
gem "isodoc", git: "https://github.com/metanorma/isodoc", branch: "main"
gem "sassc"

but no success.

@opoudjis
Copy link
Contributor

Missed this at the time, but has since been fixed: metanorma/metanorma-un#226

@opoudjis opoudjis added the duplicate This issue or pull request already exists label Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
Archived in project
Development

No branches or pull requests

2 participants