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

NameError: invalid attribute name `charlie""' #548

Closed
zachwhaley opened this issue Jan 1, 2020 · 2 comments
Closed

NameError: invalid attribute name `charlie""' #548

zachwhaley opened this issue Jan 1, 2020 · 2 comments

Comments

@zachwhaley
Copy link

Getting a very strange error when running htmlproofer. As far as I can tell this is unrelated to my HTML files since the word charlie isn't in any of them πŸ˜•

β†’ bundle exec htmlproofer --trace --assume-extension --allow-hash-href --disable-external ./_site/
Running ["ImageCheck", "ScriptCheck", "LinkCheck"] on ["./_site/"] on *.html...


bundler: failed to load command: htmlproofer (/Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/bin/htmlproofer)
NameError: invalid attribute name `charlie""'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/element.rb:17:in `attr_reader'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/element.rb:17:in `block in initialize'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/element.rb:15:in `each_pair'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/element.rb:15:in `initialize'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/check.rb:19:in `new'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/check.rb:19:in `create_element'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/check/images.rb:20:in `block in run'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri/xml/node_set.rb:238:in `block in each'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri/xml/node_set.rb:237:in `upto'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri/xml/node_set.rb:237:in `each'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/check/images.rb:19:in `run'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/runner.rb:104:in `block (2 levels) in check_parsed'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/runner.rb:101:in `each'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/runner.rb:101:in `block in check_parsed'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/runner.rb:100:in `each'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/runner.rb:100:in `check_parsed'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/runner.rb:115:in `check_path'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/runner.rb:89:in `block in process_files'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/runner.rb:89:in `map'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/runner.rb:89:in `process_files'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/runner.rb:70:in `check_files'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/lib/html-proofer/runner.rb:42:in `run'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/bin/htmlproofer:105:in `block (2 levels) in <top (required)>'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.0/bin/htmlproofer:11:in `<top (required)>'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/bin/htmlproofer:23:in `load'
  /Users/zacharyw/code/galtx-centex.github.io/vendor/bundle/ruby/2.6.0/bin/htmlproofer:23:in `<top (required)>'
zachwhaley added a commit to galtx-centex/galtx-centex.github.io that referenced this issue Jan 1, 2020
@gjtorikian
Copy link
Owner

There is the word Charlie in one of them, /_site/greyhounds/chargingwarrior/index.html:

  <div class="col-md-6">
    
      <img class="img-rounded" src="/img/chargingwarrior.jpg" alt="Charging Warrior "Charlie"">
    
  </div>

There are a couple of ways to fix this:

  • Switch the title of chargingwarrior.md to title: Charging Warrior 'Charlie'
  • Change the greyhound.html template to remove quotes: alt="{{ greyhound.title | remove: '"' }}

Hope this helps.

@zachwhaley
Copy link
Author

Oops, forgot to check case 😝

Thanks!

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

No branches or pull requests

2 participants