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

Fix: jpeg invalid byte sequence when checking unused #382

Merged
merged 1 commit into from
Jun 22, 2021
Merged

Fix: jpeg invalid byte sequence when checking unused #382

merged 1 commit into from
Jun 22, 2021

Conversation

keymastervn
Copy link
Contributor

I got this error backtrace when i18n-tasks unused -l en

/Users/dat/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/i18n-tasks-0.9.34/lib/i18n/tasks/scanners/pattern_scanner.rb:42:in `scan': invalid byte sequence in UTF-8 (ArgumentError)
  7: from /Users/dat/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/i18n-tasks-0.9.34/lib/i18n/tasks/scanners/scanner_multiplexer.rb:34:in `block (3 levels) in collect_results'
  6: from /Users/dat/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/i18n-tasks-0.9.34/lib/i18n/tasks/scanners/file_scanner.rb:26:in `keys'
  5: from /Users/dat/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/i18n-tasks-0.9.34/lib/i18n/tasks/scanners/file_scanner.rb:57:in `traverse_files'
  4: from /Users/dat/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/i18n-tasks-0.9.34/lib/i18n/tasks/scanners/files/file_finder.rb:30:in `traverse_files'
  3: from /Users/dat/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/i18n-tasks-0.9.34/lib/i18n/tasks/scanners/files/file_finder.rb:30:in `map'
  2: from /Users/dat/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/i18n-tasks-0.9.34/lib/i18n/tasks/scanners/file_scanner.rb:27:in `block in keys'
  1: from /Users/dat/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/i18n-tasks-0.9.34/lib/i18n/tasks/scanners/pattern_scanner.rb:42:in `scan_file'
/Users/dat/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/i18n-tasks-0.9.34/lib/i18n/tasks/scanners/pattern_scanner.rb:42:in `scan': Error scanning app/assets/images/intrust_super_logo.jpeg: invalid byte sequence in UTF-8 (I18n::Tasks::CommandError)
i18n-tasks: Error scanning app/assets/images/intrust_super_logo.jpeg: invalid byte sequence in UTF-8

Added *.jpeg to ALWAYS_EXCLUDE

@glebm glebm merged commit 2b30a39 into glebm:main Jun 22, 2021
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

Successfully merging this pull request may close these issues.

2 participants