Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

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

Closed
ProbablyRusty opened this issue Jul 14, 2015 · 5 comments
Closed

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

ProbablyRusty opened this issue Jul 14, 2015 · 5 comments

Comments

@ProbablyRusty
Copy link

Seeing lita-slack crash frequently, as follows:

/usr/local/rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/lita-slack-1.5.0/lib/lita/adapters/slack/message_handler.rb:102:in `gsub': invalid byte sequence in US-ASCII (ArgumentError)
    from /usr/local/rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/lita-slack-1.5.0/lib/lita/adapters/slack/message_handler.rb:102:in `remove_formatting'
    from /usr/local/rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/lita-slack-1.5.0/lib/lita/adapters/slack/message_handler.rb:43:in `body'
    from /usr/local/rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/lita-slack-1.5.0/lib/lita/adapters/slack/message_handler.rb:115:in `dispatch_message'
    from /usr/local/rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/lita-slack-1.5.0/lib/lita/adapters/slack/message_handler.rb:158:in `handle_message'
    from /usr/local/rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/lita-slack-1.5.0/lib/lita/adapters/slack/message_handler.rb:17:in `handle'
    from /usr/local/rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/lita-slack-1.5.0/lib/lita/adapters/slack/rtm_connection.rb:99:in `block in receive_message'
    from /usr/local/rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/lita-slack-1.5.0/lib/lita/adapters/slack/event_loop.rb:9:in `block in defer'
    from /usr/local/rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.7/lib/eventmachine.rb:1054:in `call'
    from /usr/local/rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.7/lib/eventmachine.rb:1054:in `block in spawn_threadpool'
@freibuis
Copy link
Contributor

interesting. this might be OS related. you wouldn't happen to be running this on windows by any chance?

@jimmycuadra
Copy link
Contributor

It might be this: litaio/lita-hipchat#3

@ProbablyRusty
Copy link
Author

No, running in Centos 6.6 within a Docker container. Let me know if any testing would be useful. Happy to help.

@ProbablyRusty
Copy link
Author

Okay, I have added this to the Dockerfile in my Centos environment:

RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8
ENV LANG en_US.UTF-8  
ENV LANGUAGE en_US:en  
ENV LC_ALL en_US.UTF-8  

The container now reports this:

# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

I will keep an eye on this to see if this issue recurs, and will report back.

@ProbablyRusty
Copy link
Author

Just reporting back that, after the above post, this seems to have stabilized.

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

No branches or pull requests

3 participants