gglockner / teslajson

Simple Python class to access the Tesla JSON API
MIT License
148 stars 54 forks source link

email specification gives me error. #4

Closed pdxaraj closed 8 years ago

pdxaraj commented 8 years ago

Hi

I copied the sample odometer script and just calling as is, seems to give me an error as shown below. Any idea about how to fix it?

File "./tesla.py", line 7, in TESLA_EMAIL = os.environ['my@gmail.com'] File "/usr/lib64/python2.7/UserDict.py", line 23, in getitem raise KeyError(key) KeyError: 'my@gmail.com'

the-mace commented 8 years ago

Yes, that os.environ call is getting an environment variable for the email address. If you want to just set it directly (by changing the script as you did) just set it directly like:

TESLA_EMAIL = 'my@gmail.com'

I made it an environment variable so you didnt have to modify the script.

gglockner commented 8 years ago

Sorry, what sample odometer script?

the-mace commented 8 years ago

I think he's talking about my stuff from https://github.com/the-mace/evtools that uses teslajson.

pdxaraj commented 8 years ago

Yes.. do you have a method to reach across proxy's?

On Tue, May 10, 2016 at 6:52 AM, Rob notifications@github.com wrote:

I think he's talking about my stuff from https://github.com/the-mace/evtools that uses teslajson.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/gglockner/teslajson/issues/4#issuecomment-218163680

the-mace commented 8 years ago

Not sure what you mean, all traffic from these scripts is outbound so proxy is irrelevant.

gglockner commented 8 years ago

It could be a proxy server running on his network. Anyway, this looks like an issue in evtools, not teslajson.