Skip to content

Unable to post back messages to a channel #232

@jeffbilder

Description

@jeffbilder

When attempting to send return data back to a slack channel, the following error is issued:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/slackbot/dispatcher.py", line 55, in _dispatch_msg_handler
    func(Message(self._client, msg), *args)
  File "/home/slackbot/cranebot/cranebot/khasbaht/plugins/saltorch.py", line 23, in salt
    cmd_runner(cmd, message, user)
  File "/home/slackbot/cranebot/cranebot/khasbaht/helpers.py", line 696, in cmd_runner
    stdout=results.stdout, stderr=results.stderr)
  File "/home/slackbot/cranebot/cranebot/khasbaht/helpers.py", line 738, in format_response
    return check_response(message, response), default_username
  File "/home/slackbot/cranebot/cranebot/khasbaht/helpers.py", line 710, in check_response
    message.channel.upload_file(fname, tmpf)
  File "/usr/local/lib/python3.6/site-packages/slackbot/dispatcher.py", line 299, in channel
    return self._client.get_channel(self._body['channel'])
  File "/usr/local/lib/python3.6/site-packages/slackbot/slackclient.py", line 174, in get_channel
    return Channel(self, self.channels[channel_id])
  KeyError: 'xxxxxxx'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions