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

issue with encoding in python3 #212

Open
TC-matthew-wenger opened this issue Sep 27, 2021 · 1 comment
Open

issue with encoding in python3 #212

TC-matthew-wenger opened this issue Sep 27, 2021 · 1 comment

Comments

@TC-matthew-wenger
Copy link

I'm getting an encoding error in python3 when taking the app out of debug mode and running warner.py

Traceback (most recent call last):
  File "/Users/matthew.wenger/destalinator/warner.py", line 18, in <module>
    Warner().warn(force_warn=force_warn)
  File "/Users/matthew.wenger/destalinator/warner.py", line 11, in warn
    self.ds.warn_all(self.config.warn_threshold, force_warn)
  File "/Users/matthew.wenger/destalinator/destalinator.py", line 229, in warn_all
    if self.warn(channel, days, force_warn):
  File "/Users/matthew.wenger/destalinator/destalinator.py", line 214, in warn
    self.post_marked_up_message(channel_name, self.warning_text, message_type='channel_warning')
  File "/Users/matthew.wenger/destalinator/destalinator.py", line 108, in post_marked_up_message
    self.slacker.post_message(channel_name, self.add_slack_channel_markup(message), **kwargs)
  File "/Users/matthew.wenger/destalinator/slacker.py", line 325, in post_message
    post_data['attachments'] = json.dumps([{'fallback': message_type}], encoding='utf-8')
  File "/usr/local/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 234, in dumps
    return cls(
TypeError: __init__() got an unexpected keyword argument 'encoding'
@christofdamian
Copy link

this might be a duplicate of #161 and could be fixed as a part of #211

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

No branches or pull requests

2 participants