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

Python Error #8

Open
ChristopherRios7 opened this issue Jun 6, 2016 · 10 comments
Open

Python Error #8

ChristopherRios7 opened this issue Jun 6, 2016 · 10 comments

Comments

@ChristopherRios7
Copy link

This is the error that I am getting:

Traceback (most recent call last):
File "smartthings.py", line 148, in
ds = st.request_devices(options.device_type)
File "smartthings.py", line 72, in request_devices
switchd['url'] = "%s/%s" % (devices_url, switchd['id'],)
TypeError: string indices must be integers

@dpjanes
Copy link
Owner

dpjanes commented Jun 6, 2016

Is it that the app hasn't been authorized to see this device yet?

@OriginalResponsibleUser

I had to change the URL in the python code from "graph.api.smartthings.com" to "https://graph-na02-useast1.api.smartthings.com" and that fixed the same error for me.

@dpjanes
Copy link
Owner

dpjanes commented Jun 19, 2016

How did you come up with that URL?

@OriginalResponsibleUser

It's the one I log into. I'm a relatively new (three or so months) user and I've been out on a different t server

@dpjanes
Copy link
Owner

dpjanes commented Jun 20, 2016

Any suggestions on how I should deal with this? Allow for an optional URL
in the smarthings.json ?

On Sun, Jun 19, 2016 at 2:46 PM, jacobbraun [email protected]
wrote:

It's the one I log into. I'm a relatively new (three or so months) user
and I've been out on a different t server


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#8 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ACNDx_tkzTNxaLTb3Fay6Kqi50n2zqe1ks5qNXmGgaJpZM4IvW-s
.

@datamattsson
Copy link

Could we file a ticket with SmartThings to understand their intent is and design around what answers they may provide?

@dpjanes
Copy link
Owner

dpjanes commented Jun 22, 2016

Can you do that, since I'm not actually experiencing the issue?

On Tue, Jun 21, 2016 at 1:32 PM, Michael Mattsson [email protected]
wrote:

Could we file a ticket with SmartThings to understand their intent is and
design around what answers they may provide?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#8 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ACNDxww5nFlUU6VbicyfuUgq3xpZtUn9ks5qOAsVgaJpZM4IvW-s
.

@tomowad
Copy link

tomowad commented Apr 27, 2017

I ran into this issue as well, and the same fix worked.

@tomowad
Copy link

tomowad commented Apr 27, 2017

Here's some more information that addresses the differences in URLs: https://community.smartthings.com/t/faq-how-to-find-out-what-shard-cloud-slice-ide-url-your-account-location-is-on/53923

@dpjanes
Copy link
Owner

dpjanes commented Apr 28, 2017

Thank you all. I will work on a fix for this.

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

5 participants