Home Assistant release with the issue: 0.94.0 - 0.94.1 - 0.94.2
Last working Home Assistant release (if known): 0.93.2
Operating environment (Hass.io/Docker/Windows/etc.): HassOS 2.12 - Supervisor 166
Component/platform: Google Maps Location Sharing
Description of problem:
Unable to stting up the component
Error : TypeError: 'NoneType' object is not iterable
Problem-relevant configuration.yaml
entries and (fill out even if it seems unimportant):
- platform: google_maps
username: !secret googlemaps_user
password: !secret googlemaps_password
max_gps_accuracy: 1000
Traceback (if applicable):
Error setting up platform legacy
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 76, in async_setup_legacy
tracker.see, discovery_info)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/google_maps/device_tracker.py", line 39, in setup_scanner
scanner = GoogleMapsScanner(hass, config, see)
File "/usr/src/homeassistant/homeassistant/components/google_maps/device_tracker.py", line 60, in __init__
self._update_info()
File "/usr/src/homeassistant/homeassistant/components/google_maps/device_tracker.py", line 72, in _update_info
for person in self.service.get_all_people():
File "/usr/local/lib/python3.7/site-packages/locationsharinglib/locationsharinglib.py", line 439, in get_all_people
people = self.get_shared_people() + [self.get_authenticated_person()]
File "/usr/local/lib/python3.7/site-packages/locationsharinglib/locationsharinglib.py", line 400, in get_shared_people
for info in output[0]:
TypeError: 'NoneType' object is not iterable
Are there any people sharing location with googlemaps_user? I think there is problem with locationsharinglib only tracking in self mode. (See https://github.com/costastf/locationsharinglib/commit/af16df2fb655d41fc35fbdea1c76ee9fbf38d783)
I have the same problem.
Maybe you just have to change the version of the dependency of locationsharinglib to 4.0.1.
Because the issue seems resolved in the package.
Bei careful. Since Version 4 locationsharinglib does not handle the login to Google.
I think the component should be modified to handle the updates in locationsharinglib
I modified the component to use 4.0.1, it is different than 3.0.11. I'm not sure if my changes would be accepted though since the google login has to be done separately. But here it is:
In manifest.json:
- "locationsharinglib==3.0.11"
+ "locationsharinglib==4.0.1"
and in device_tracker.py:
+++ b/homeassistant/components/google_maps/device_tracker.py
@@ -46,7 +46,6 @@ class GoogleMapsScanner:
def __init__(self, hass, config: ConfigType, see) -> None:
"""Initialize the scanner."""
from locationsharinglib import Service
- from locationsharinglib.locationsharinglibexceptions import InvalidUser
self.see = see
self.username = config[CONF_USERNAME]
@@ -56,7 +55,7 @@ class GoogleMapsScanner:
try:
credfile = "{}.{}".format(hass.config.path(CREDENTIALS_FILE),
slugify(self.username))
- self.service = Service(self.username, self.password, credfile)
+ self.service = Service(credfile, self.username)
self._update_info()
track_time_interval(
@@ -64,7 +63,7 @@ class GoogleMapsScanner:
self.success_init = True
- except InvalidUser:
+ except:
_LOGGER.error("You have specified invalid login credentials")
self.success_init = False
thank you
Is it possible to integrate it into the "dev" build?
I want to test my docker configuration
I'm pretty much a neophyte at this, I just set up a dev environment tonight :)
I did fork the code and push my changes up to it:
https://github.com/dennyreiter/home-assistant
I turned this into a custom component:
https://github.com/dennyreiter/hass-gmaps
Most helpful comment
I have the same problem.