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

No implicit conversion of nil into String (TypeError) #360

Closed
tkrop opened this issue Aug 17, 2020 · 4 comments
Closed

No implicit conversion of nil into String (TypeError) #360

tkrop opened this issue Aug 17, 2020 · 4 comments
Labels

Comments

@tkrop
Copy link

tkrop commented Aug 17, 2020

Sorry that we do not have the time to investigate further: Since some unknown date between Jun 14 and July 30, we experience the following error running docker run -v output:/documents/ asciidoctor/docker-asciidoctor asciidoctor-epub3 -D /documents/output index.adoc on http://github.com/zalando/restful-api-guidelines (see also zalando/restful-api-guidelines#597). It was working fine before and if we fallback to asciidoctor/docker-asciidoctor:1.1.0 everything works fine again.

/usr/lib/ruby/gems/2.7.0/gems/asciidoctor-epub3-1.5.0.alpha.18/lib/asciidoctor-epub3/converter.rb:108:in `basename': no implicit conversion of nil into String (TypeError)
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-epub3-1.5.0.alpha.18/lib/asciidoctor-epub3/converter.rb:108:in `convert'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:75:in `convert'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:84:in `block in content'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:84:in `map'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:84:in `content'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-epub3-1.5.0.alpha.18/lib/asciidoctor-epub3/converter.rb:454:in `convert_section'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-epub3-1.5.0.alpha.18/lib/asciidoctor-epub3/converter.rb:106:in `convert'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:75:in `convert'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:84:in `block in content'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:84:in `map'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:84:in `content'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/document.rb:1020:in `content'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-epub3-1.5.0.alpha.18/lib/asciidoctor-epub3/converter.rb:359:in `add_chapter'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-epub3-1.5.0.alpha.18/lib/asciidoctor-epub3/converter.rb:250:in `convert_document'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-epub3-1.5.0.alpha.18/lib/asciidoctor-epub3/converter.rb:106:in `convert'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/document.rb:951:in `convert'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:118:in `convert'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:183:in `block in convert_file'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:183:in `open'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:183:in `convert_file'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/invoker.rb:128:in `block in invoke!'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/invoker.rb:111:in `each'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/invoker.rb:111:in `invoke!'
	from /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-epub3-1.5.0.alpha.18/bin/asciidoctor-epub3:28:in `<top (required)>'
	from /usr/bin/asciidoctor-epub3:23:in `load'
	from /usr/bin/asciidoctor-epub3:23:in `<main>'

May be you have an idea what changed and how to fix this.

@slonopotamus
Copy link
Contributor

slonopotamus commented Aug 17, 2020

  1. Your document has inline toc::[] macro that we don't support (Support in-document TOC placement at user-defined location #344)
  2. We failed to report a warning about that

@slonopotamus
Copy link
Contributor

As a workaround, hide toc::[] macro from asciidoctor-epub3 via ifndef::ebook-format

@tkrop
Copy link
Author

tkrop commented Aug 17, 2020

Thanks for the response and the advice :)

@slonopotamus
Copy link
Contributor

For the reference, this bug was introduced in commit 87b135d.

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

No branches or pull requests

2 participants