This repository was archived by the owner on Aug 15, 2022. It is now read-only.
Make python-rtmbot friendlier to encoding#44
Closed
tiphaine wants to merge 4 commits intoslack-samples:masterfrom
Closed
Make python-rtmbot friendlier to encoding#44tiphaine wants to merge 4 commits intoslack-samples:masterfrom
tiphaine wants to merge 4 commits intoslack-samples:masterfrom
Conversation
Python 3.5.1: The ‘message’ was encoded in bytes with encode('ascii',
'ignore') but it was not decoded in a string before sending it out in
the following send_message method. As a result, I had the string with
the b’prefix appearing in my slack channel.
Python 3.5.1: The ‘message’ was encoded in bytes with encode('ascii',
'ignore') but it was not decoded in a string before sending it out in
the following send_message method. As a result, I had the string with
the b’prefix appearing in my slack channel.
For real this time :)
Contributor
|
Ok, I believe I've resolved this issue with #46. Please give it a look and feel free to add comments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
In core.py, the message was still bytes (result of encode()) before being sent to the channel (send_message), this resulted in strings prefixed as bytes being displayed in the channel.
I also fixed a few lint warnings.
In doc/example-plugins/counter.py, time.time() generated an AttributeError because it was a float instead of a String.