Skip to content
New issue

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

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

Already on GitHub? # to your account

invalid byte sequence in US-ASCII (ArgumentError) #352

Closed
1 of 5 tasks
kakulukia opened this issue Apr 14, 2020 · 4 comments
Closed
1 of 5 tasks

invalid byte sequence in US-ASCII (ArgumentError) #352

kakulukia opened this issue Apr 14, 2020 · 4 comments
Assignees

Comments

@kakulukia
Copy link

kakulukia commented Apr 14, 2020

Description

colorls has problem in a specific directory.
Its not very obvious, but i guess its some git problem, since the file listing is fine and the error raises, when i use --gs.

Here is the full error message:

17: from /usr/local/bin/colorls:23:in `<main>'
16: from /usr/local/bin/colorls:23:in `load'
15: from /var/lib/gems/2.5.0/gems/colorls-1.3.3/exe/colorls:6:in `<top (required)>'
14: from /var/lib/gems/2.5.0/gems/colorls-1.3.3/lib/colorls/flags.rb:44:in `process'
13: from /var/lib/gems/2.5.0/gems/colorls-1.3.3/lib/colorls/flags.rb:44:in `each_with_index'
12: from /var/lib/gems/2.5.0/gems/colorls-1.3.3/lib/colorls/flags.rb:44:in `each'
11: from /var/lib/gems/2.5.0/gems/colorls-1.3.3/lib/colorls/flags.rb:50:in `block in process'
10: from /var/lib/gems/2.5.0/gems/colorls-1.3.3/lib/colorls/flags.rb:50:in `new'
 9: from /var/lib/gems/2.5.0/gems/colorls-1.3.3/lib/colorls/core.rb:22:in `initialize'
 8: from /var/lib/gems/2.5.0/gems/colorls-1.3.3/lib/colorls/core.rb:226:in `process_git_status_details'
 7: from /var/lib/gems/2.5.0/gems/colorls-1.3.3/lib/colorls/git.rb:16:in `status'
 6: from /var/lib/gems/2.5.0/gems/colorls-1.3.3/lib/colorls/git.rb:54:in `git_subdir_status'
 5: from /var/lib/gems/2.5.0/gems/colorls-1.3.3/lib/colorls/git.rb:20:in `block in status'
 4: from /usr/lib/ruby/2.5.0/pathname.rb:507:in `relative_path_from'
 3: from /usr/lib/ruby/2.5.0/pathname.rb:89:in `cleanpath'
 2: from /usr/lib/ruby/2.5.0/pathname.rb:101:in `cleanpath_aggressive'
 1: from /usr/lib/ruby/2.5.0/pathname.rb:43:in `chop_basename'
/usr/lib/ruby/2.5.0/pathname.rb:43:in `=~': invalid byte sequence in US-ASCII (ArgumentError)

Nevertheless even if there is a problem with one specific file, whatever it may be, colorls should never fail to at least display the files and may have a missing git status icon, when there is an error.

Im not sure what i might do to get further info on whats happening here?
But maybe the error line is enough to see whats broken.

colors --version: 1.3.3
OS: ubuntu

  • Relevant Issues : (none)
  • Relevant PRs : (none)
  • Type of issue :
    • Bug in existing feature
    • Installation
    • Font-related
    • Feature request
    • Developer mode : Code quality / Tests / Documentation
@avdv avdv self-assigned this Apr 15, 2020
@avdv
Copy link
Collaborator

avdv commented Apr 15, 2020

Hi, thanks for your report.

What's the output of locale on your system?

@kakulukia
Copy link
Author

LANG=C
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

@kakulukia
Copy link
Author

okay, setting my LANG to en_US.utf8 fixed the issue - im fine with that option

@avdv
Copy link
Collaborator

avdv commented Apr 16, 2020

okay, setting my LANG to en_US.utf8 fixed the issue - im fine with that option

Well, I think we should handle that gracefully. I think #353 should take care of that.

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

No branches or pull requests

2 participants