invalid multibyte escape error

Bug #1464902 reported by Eugene Fedin
44
This bug affects 7 people
Affects Status Importance Assigned to Milestone
whatweb (Ubuntu)
Confirmed
Medium
khalidovish

Bug Description

The program returns error

Steps to reproduce
whatweb --version

Expected result
Display version information

Actual result
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': /usr/lib/ruby/vendor_ruby/rchardet/universaldetector.rb:39: invalid multibyte escape: /[\x80-\xFF]/ (SyntaxError)
 from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
 from /usr/lib/ruby/vendor_ruby/rchardet.rb:55:in `<top (required)>'
 from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
 from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
 from /usr/bin/whatweb:88:in `block in <main>'
 from /usr/bin/whatweb:84:in `each'
 from /usr/bin/whatweb:84:in `<main>'

Another example of this error
$ whatweb example.com
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': /usr/lib/ruby/vendor_ruby/rchardet/universaldetector.rb:39: invalid multibyte escape: /[\x80-\xFF]/ (SyntaxError)
 from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
 from /usr/lib/ruby/vendor_ruby/rchardet.rb:55:in `<top (required)>'
 from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
 from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
 from /usr/bin/whatweb:88:in `block in <main>'
 from /usr/bin/whatweb:84:in `each'
 from /usr/bin/whatweb:84:in `<main>'

Release: Ubuntu 15.04
Package version: 0.4.8~git20141014-1
Ruby package version: 1:2.1.0.4ubuntu1

Tags: vivid wily
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in whatweb (Ubuntu):
status: New → Confirmed
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for reporting.

I am able to reproduce this issue with whatweb 0.4.8~git20150507-1 on Ubuntu Wily. The interesting part is that I was not able to trigger this on Debian, which means it looks an Ubuntu-only issue, though I'm not sure how.

tags: added: vivid wily
Changed in whatweb (Ubuntu):
importance: Undecided → Medium
Revision history for this message
pbhj (pbhj) wrote :

I have this bug in Kubuntu 15.10:

user$ whatweb --version
/usr/bin/whatweb: /usr/lib/ruby/vendor_ruby/rchardet/universaldetector.rb:39: invalid multibyte escape: /[\x80-\xFF]/ (SyntaxError)

user$ apt show ruby
Package: ruby
Priority: optional
Section: interpreters
Installed-Size: 36.9 kB
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Antonio Terceiro <email address hidden>
Source: ruby-defaults
Version: 1:2.3.0+1
Replaces: irb, rdoc, rubygems
Provides: irb, rdoc, rubygems
Depends: ruby2.3
Suggests: ri, ruby-dev
Conflicts: ruby-activesupport-2.3, ruby-activesupport-3.2
Breaks: apt-listbugs (<< 0.1.6), rbenv (<= 0.4.0-1), ruby-debian (<< 0.3.8+b3), ruby-switch (<= 0.1.0)
Download-Size: 5,530 B
Homepage: http://www.ruby-lang.org/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: kubuntu-desktop, kubuntu-full, edubuntu-desktop-gnome, ubuntustudio-fonts
APT-Manual-Installed: yes
APT-Sources: http://gb.archive.ubuntu.com/ubuntu/ xenial/main amd64 Packages
Description: Interpreter of object-oriented scripting language Ruby (default version)
 Ruby is the interpreted scripting language for quick and easy object-
 oriented programming. It has many features to process text files and to
 do system management tasks (as in perl). It is simple, straight-forward,
 and extensible.
 .
 This package is a dependency package, which depends on Debian's default
 Ruby version (currently v2.3).

user$ apt show ruby-rchardet
Package: ruby-rchardet
Priority: optional
Section: universe/ruby
Installed-Size: 497 kB
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Debian Ruby Extras Maintainers <email address hidden>
Version: 1.3-3build1
Depends: ruby | ruby-interpreter
Download-Size: 91.7 kB
Homepage: http://github.com/jmhodges/rchardet/tree/master
Ruby-Versions: all
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
APT-Manual-Installed: no
APT-Sources: http://gb.archive.ubuntu.com/ubuntu/ xenial/universe amd64 Packages
Description: Character encoding auto-detection for Ruby
 CharDet is a library to automatically detect character encoding 'as smart
 as your browser'

Changed in whatweb (Ubuntu):
assignee: nobody → khalidovish (khalidovish)
Revision history for this message
Jaap de Haan (jaap-dehaan) wrote :

Prepend the following line — it must be the first line in the file:

# encoding: US-ASCII

That solves the problem but there might be a cleaner solution.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.