opsdroid / connector-slack

📡 A slack connector for opsdroid
Apache License 2.0
2 stars 3 forks source link

Cannot connect to channel #16

Closed marcpires closed 6 years ago

marcpires commented 6 years ago

I configured the bot with api-token and etc. But when the bot starts, it gets an error as follows:

ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953748>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953710>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953748>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x1119537f0>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953710>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953828>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953860>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953898>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953780>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x1119538d0>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x1119539b0>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953780>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953a58>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x1119537b8>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953978>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953ac8>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953b38>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953978>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953b00>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953b70>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953ba8>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953be0>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953c18>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953c50>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953c88>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953908>
ERROR asyncio: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111953cc0>
INFO opsdroid.connector.slack: Connecting to Slack
Traceback (most recent call last):
  File "./.env/bin/opsdroid", line 11, in <module>
    sys.exit(main())
  File "/Users/marcelopires/Desktop/chat-ops/opsdroid/.env/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/marcelopires/Desktop/chat-ops/opsdroid/.env/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/marcelopires/Desktop/chat-ops/opsdroid/.env/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/marcelopires/Desktop/chat-ops/opsdroid/.env/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/marcelopires/Desktop/chat-ops/opsdroid/.env/lib/python3.6/site-packages/opsdroid/__main__.py", line 192, in main
    opsdroid.start_loop()
  File "/Users/marcelopires/Desktop/chat-ops/opsdroid/.env/lib/python3.6/site-packages/opsdroid/core.py", line 137, in start_loop
    self.start_connector_tasks(connectors)
  File "/Users/marcelopires/Desktop/chat-ops/opsdroid/.env/lib/python3.6/site-packages/opsdroid/core.py", line 183, in start_connector_tasks
    self.eventloop.run_until_complete(connector.connect(self))
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete
    return future.result()
  File "/Users/marcelopires/Desktop/chat-ops/opsdroid/.env/lib/python3.6/site-packages/opsdroid/connector/slack/__init__.py", line 48, in connect
    connection = await self.slacker.rtm.start()
  File "/Users/marcelopires/Desktop/chat-ops/opsdroid/.env/lib/python3.6/site-packages/aioslacker/__init__.py", line 48, in __request
    method = self.methods[method]
KeyError: <bound method BaseAPI._session_get of <aioslacker.RTM object at 0x111953748>>
Exception ignored in: <bound method BaseEventLoop.__del__ of <_UnixSelectorEventLoop running=False closed=True debug=False>>
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 511, in __del__
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/unix_events.py", line 65, in close
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/unix_events.py", line 146, in remove_signal_handler
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/signal.py", line 47, in signal
TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object
jacobtomlinson commented 6 years ago

Thanks for raising this. There does seem to be a bug in the Slack connector. This connector has actually been merged into the core project and this repo is just a legacy thing. So I'll reraise this issue there. I'll start looking into a fix straight away.

jacobtomlinson commented 6 years ago

Replaced with opsdroid/opsdroid#649

jacobtomlinson commented 6 years ago

In the mean time I recommend you install opsdroid 0.12.1.