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

TinyTuya error #195

Closed
grampasso-lento opened this issue Oct 11, 2022 · 3 comments · Fixed by #196
Closed

TinyTuya error #195

grampasso-lento opened this issue Oct 11, 2022 · 3 comments · Fixed by #196

Comments

@grampasso-lento
Copy link

Hi, after configuring the Tuya account and website (all my devices are listed there) i am running °python -m tinytuya wizard -nocolor° but I get the following output:

Traceback (most recent call last):
File "C:\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python39\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Python39\lib\site-packages\tinytuya_main
.py", line 64, in
wizard.wizard(color=color, forcescan=force)
File "C:\Python39\lib\site-packages\tinytuya\wizard.py", line 223, in wizard
tuyadevices = cloud.filter_devices( json_data['result'], ip_list )
KeyError: 'result'

Also, running "python -m tinytuya scan" I only get 2 of my devices listed there.
Any help?
Thanks in advance.
Giovanni

@uzlonewolf
Copy link
Collaborator

I was able to reproduce this with a correct key and secret, but wrong region and/or device id. Double-check to make sure both the Region and Device ID are correct. I'll see if we can detect this like we do for bad keys/secrets and add a better error message when encountered.

@grampasso-lento
Copy link
Author

Hi, tried with all the region codes (all the same except cn which gives a cross-region access error). Also tried with the two devices which are detected in the snapshot.json.
I take the opportunity to inform you that there might be a typo error in this file, "ablilty" should be "ability" maybe?
thanks

@uzlonewolf
Copy link
Collaborator

uzlonewolf commented Oct 12, 2022

That "ablilty" is directly from the device itself, there is nothing we can do about it.

Are you sure those devices are linked to your developer account? The Region must also match what is set in your developer account. The only way to get that backtrace is if Tuya's servers are rejecting the device list request.

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

Successfully merging a pull request may close this issue.

2 participants