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

TypeError: normalize() argument 2 must be str, not None #21

Closed
NameLessJedi opened this issue May 8, 2018 · 10 comments
Closed

TypeError: normalize() argument 2 must be str, not None #21

NameLessJedi opened this issue May 8, 2018 · 10 comments

Comments

@NameLessJedi
Copy link

I'm using 2.0.2.
Yesterday soon after I switched to 2.0.2 Google forced me to play with captchas so I disabled google_maps tracker and re-enabled it just now. This time I get:

2018-05-09 00:00:04 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform google_maps
Traceback (most recent call last):
  File "/home/hassio/ha36/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 184, in async_setup_platform                                                                                                    
    disc_info)
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/hassio/ha36/lib/python3.6/site-packages/homeassistant/components/device_tracker/google_maps.py", line 37, in setup_scanner                                                                                                         
    scanner = GoogleMapsScanner(hass, config, see)
  File "/home/hassio/ha36/lib/python3.6/site-packages/homeassistant/components/device_tracker/google_maps.py", line 56, in __init__                                                                                                              
    self._update_info()
  File "/home/hassio/ha36/lib/python3.6/site-packages/homeassistant/components/device_tracker/google_maps.py", line 69, in _update_info                                                                                                          
    dev_id = 'google_maps_{0}'.format(slugify(person.id))
  File "/home/hassio/ha36/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 43, in slugify
    text = normalize('NFKD', text)
TypeError: normalize() argument 2 must be str, not None

@NameLessJedi
Copy link
Author

NameLessJedi commented May 10, 2018

Today I restarted HA and voila everything works. Yesterday I did couple of restarts but always ended with above errors
Some race-condition? In the meantime I didn't do anything related to locations sharing (I didn't even touch that account)

And within an hour since that restart I started to get:

This page appears when Google automatically detects requests coming from your computer network which appear to be in violation of the Terms of Service. The block will expire shortly after those requests stop.
in the logs. For google_maps tracker I've set interval to 60 in configuration.

@dshokouhi
Copy link

This sounds a lot like the bug I described in #20 I wonder if the error goes away after 3 hours as well.

@NameLessJedi
Copy link
Author

@dshokouhi you mean that need of human intervention? For last couple of days I've been trying this on and off but never got past error while setting up component (and thus it was inactive) so can't verify it (I'm still on 0.68.1).

@woody4165
Copy link

I'm having same issue on Hass.io 0.69.1
How can I check the lib version?
I've tried to remove the .google_maps_location_sharing.cookies but with no success.

@NameLessJedi
Copy link
Author

if you have shell access you can issue pip list | grep locationsharing or python -m pip list | grep locationsharing I believe that 0.69.1 ships with 1.2.2
Next version should have 2.0.2
If you are eager to try 2.0.2 just edit homeassistant/components/device_tracker/google_maps.py (path may vary on Hass.io :/ ) and change line:
REQUIREMENTS = ['locationsharinglib==1.2.2]
to
REQUIREMENTS = ['locationsharinglib==2.0.2']
and restart HA
At least for me it didn't change anything. Straight after (re)start HA gets current location from google_map component than throws error from opening post in this issue and that's it (till next restart)

@woody4165
Copy link

I have no access to pip command since I'm on Hass.io
I'll wait new version hoping will be solved.
Thanks

@NameLessJedi
Copy link
Author

2.0.7 seems to fix my problems. I'll wait a few to see if this sticks.
Is there any chance to get this pushed to HA 0.70 ?

@dshokouhi
Copy link

0.70 is already in beta it may make it in 0.71 depending on when it gets submitted

@costastf
Copy link
Owner

@NameLessJedi please report back if things keep working fine and close the issue. After we make sure it works we can try to update the component to this version for HA.

@NameLessJedi
Copy link
Author

That was my intention :)
Still working flawlessly :) so issue solved by 2.0.7

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

4 participants