home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.72k stars 30.45k forks source link

XMPP TypeError while resolving #3523

Closed fabaff closed 8 years ago

fabaff commented 8 years ago

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version): 0.29.0.dev0

Python release (python3 --version): Python 3.5.1

Component/platform: notify/xmpp

Description of problem: Message not send.

Expected: A delivered message.

Problem-relevant configuration.yaml entries and steps to reproduce:

notify:
  - platform: xmpp
    name: jabber
    sender: sender@swissjabber.org
    password: !secret xmpp_password
    recipient: recipient@swissjabber.org

Traceback (if applicable):

Traceback (most recent call last):
  File "/home/fab/Documents/repos/home-assistant/homeassistant/core.py", line 1162, in job_handler
    func(*args)
  File "/home/fab/Documents/repos/home-assistant/homeassistant/core.py", line 1025, in _execute_service
    service(call)
  File "/home/fab/Documents/repos/home-assistant/homeassistant/core.py", line 825, in __call__
    self.func(call)
  File "/home/fab/Documents/repos/home-assistant/homeassistant/components/notify/__init__.py", line 109, in notify_message
    notify_service.send_message(**kwargs)
  File "/home/fab/Documents/repos/home-assistant/homeassistant/components/notify/xmpp.py", line 61, in send_message
    self._recipient, self._tls, data)
  File "/home/fab/Documents/repos/home-assistant/homeassistant/components/notify/xmpp.py", line 95, in send_message
    SendNotificationBot()
  File "/home/fab/Documents/repos/home-assistant/homeassistant/components/notify/xmpp.py", line 81, in __init__
    self.connect(use_tls=self.use_tls, use_ssl=False)
  File "/home/fab/Documents/repos/home-assistant/lib64/python3.5/site-packages/sleekxmpp/clientxmpp.py", line 160, in connect
    reattempt=reattempt)
  File "/home/fab/Documents/repos/home-assistant/lib64/python3.5/site-packages/sleekxmpp/xmlstream/xmlstream.py", line 448, in connect
    args=(reattempt,))
  File "/home/fab/Documents/repos/home-assistant/lib64/python3.5/site-packages/sleekxmpp/thirdparty/statemachine.py", line 70, in transition
    func=func, args=args, kwargs=kwargs)
  File "/home/fab/Documents/repos/home-assistant/lib64/python3.5/site-packages/sleekxmpp/thirdparty/statemachine.py", line 111, in transition_any
    return_val = func(*args,**kwargs) if func is not None else True
  File "/home/fab/Documents/repos/home-assistant/lib64/python3.5/site-packages/sleekxmpp/xmlstream/xmlstream.py", line 484, in _connect
    self.address[1])
  File "/home/fab/Documents/repos/home-assistant/lib64/python3.5/site-packages/sleekxmpp/xmlstream/xmlstream.py", line 1107, in pick_dns_answer
    return next(self.dns_answers)
  File "/home/fab/Documents/repos/home-assistant/lib64/python3.5/site-packages/sleekxmpp/xmlstream/resolver.py", line 138, in resolve
    use_dnspython=use_dnspython)
  File "/home/fab/Documents/repos/home-assistant/lib64/python3.5/site-packages/sleekxmpp/xmlstream/resolver.py", line 327, in get_SRV
    if host.endswith('.'):
TypeError: endswith first arg must be bytes or a tuple of bytes, not str

Additional info: This error occurs while testing #3522. It works fine with 0.28.2 thus the assumption is that the issue is related to the recent move to async.

fabaff commented 8 years ago

Seems to fixed by https://github.com/home-assistant/home-assistant/pull/3804