python-ring-doorbell icon indicating copy to clipboard operation
python-ring-doorbell copied to clipboard

Unable to update_data

Open cmodyssey opened this issue 4 years ago • 8 comments

Hi,

I am trying to use this for the first time and I am getting a problem with getting started on this module.

I sure do have an active subscription, we have a number of ring devices active in our household.

I was also prompted for the 2FA password that was sent by SMS.

Of the two times I ran the script, the first time it needed the 2FA password and the second time, it had cached all the credentials.

Below is the result I get. I have also attached the script I have been trying to get to work.

Does anyone know what could be the problem please?

Thanks.

`

C:\Temp>test.py homeauto script started Username: @ Password: 2FA code: ****** Traceback (most recent call last): File "C:\Temp\test.py", line 73, in main() File "C:\Temp\test.py", line 66, in main ring.update_data() File "C:\Users\Richard\AppData\Local\Programs\Python\Python37\lib\site-packages\ring_doorbell_init_.py", line 58, in update_data self.update_groups() File "C:\Users\Richard\AppData\Local\Programs\Python\Python37\lib\site-packages\ring_doorbell_init_.py", line 99, in update_groups for group in data["device_groups"]: TypeError: 'NoneType' object is not iterable

C:\Temp>test.py homeauto script started Traceback (most recent call last): File "C:\Temp\test.py", line 73, in main() File "C:\Temp\test.py", line 66, in main ring.update_data() File "C:\Users\Richard\AppData\Local\Programs\Python\Python37\lib\site-packages\ring_doorbell_init_.py", line 58, in update_data self.update_groups() File "C:\Users\Richard\AppData\Local\Programs\Python\Python37\lib\site-packages\ring_doorbell_init_.py", line 99, in update_groups for group in data["device_groups"]: TypeError: 'NoneType' object is not iterable`

test.zip

cmodyssey avatar May 03 '21 09:05 cmodyssey

same here: root@Server:~/ringdownload# python3 test.py Traceback (most recent call last): File "test.py", line 49, in main() File "test.py", line 34, in main ring.update_data() File "/root/ringdownload/ring_doorbell/init.py", line 58, in update_data self.update_groups() File "/root/ringdownload/ring_doorbell/init.py", line 99, in update_groups for group in data["device_groups"]: TypeError: 'NoneType' object is not iterable root@Server:~/ringdownload#

Gamerios avatar May 04 '21 14:05 Gamerios

Hi @Gamerios

Thanks for taking a look.

Do you know how to get it working though?

Thanks.

cmodyssey avatar May 04 '21 18:05 cmodyssey

yes Need use 0.6.2 becaue 0.7.0 has that bug

Gamerios avatar May 10 '21 14:05 Gamerios

Thanks, I actually applied the change here to resolve my issue:

https://github.com/tchellomello/python-ring-doorbell/pull/243/files

cmodyssey avatar May 11 '21 16:05 cmodyssey

thanks how you found that if i can ask

Gamerios avatar May 11 '21 18:05 Gamerios

Hi, I saw a comment only the other day saying it's worth trying the pull requests and when I viewed the 2 here and saw the symptom sounded like mine, so gave it a go and voila!

cmodyssey avatar May 11 '21 18:05 cmodyssey

at you download work ??

Gamerios avatar May 28 '21 11:05 Gamerios

Hello! So, I am having this exact problem as well.

I installed it using pip as suggested. I use visual studio code as my editor. I have the latest python 3 installed.

The authentication works - I got the 2fa and I can even see in the variable that it says I'm authenticated.

In fact! I can even see my devices when I debug and look at the variables. So, why is it failing out with this NoneType error?

lordlala avatar Jun 20 '21 02:06 lordlala

There hasn't been any activity on this issue recently. This issue has been automatically marked as stale because of that. It will be closed if no further activity occurs. Please make sure to update to the latest ring_doorbell version and check if that solves the issue. Thank you for your contributions.

github-actions[bot] avatar Apr 18 '24 18:04 github-actions[bot]