NameError: global name 'HTTPError' is not defined

Posted on
Mon Jul 01, 2019 12:00 pm
shapa offline
Posts: 333
Joined: Sep 08, 2014
Location: Swindon

NameError: global name 'HTTPError' is not defined

Seeing an error (a lot).

Tesla EV Control Tesla request charge_state for vehicle 69371731399089401
Tesla EV Control Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "plugin.py", line 178, in vehicleStatus
File "plugin.py", line 204, in vehicleStatus2
NameError: global name 'HTTPError' is not defined


What could it be?

Posted on
Mon Jul 01, 2019 1:21 pm
howartp offline
Posts: 3628
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: NameError: global name 'HTTPError' is not defined

Grab https://github.com/howartp84/TeslaContr ... tag/1.0.11

I added HTTPError into 1.0.10 but didn't realise I had to import it first.

Posted on
Thu Jul 04, 2019 6:02 pm
shapa offline
Posts: 333
Joined: Sep 08, 2014
Location: Swindon

Re: NameError: global name 'HTTPError' is not defined

Ok, now it is showing correct error :)

" Tesla EV Control Error HTTP Error 408: Request Timeout
Tesla EV Control Error Timeout retrieving status: charge_state
Tesla EV Control Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "plugin.py", line 180, in vehicleStatus
File "plugin.py", line 209, in vehicleStatus2
UnboundLocalError: local variable 'response' referenced before assignment"

Is it possible to add some configurable "retry" functionality? I.e. in case of API call timeout - to retry a few times?

Posted on
Mon Jul 08, 2019 7:45 am
brianlloyd offline
User avatar
Posts: 192
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: NameError: global name 'HTTPError' is not defined

Yes, I am getting the error too. From the log:

Jul 8, 2019 at 08:28:34
Tesla EV Control Fetching vehicles...
Tesla EV Control 1 vehicles found
Tesla EV Control Debug carListGenerator: [(u'51432506199105159', u'Nicola (5YJ3E1EA4JF018669)')]
Tesla EV Control Debug Device ID: 1859711996
Tesla EV Control Tesla request doRefresh for vehicle 51432506199105159
Tesla EV Control Tesla request charge_state for vehicle 51432506199105159
Tesla EV Control Error Error in plugin execution UiClosed2:

Traceback (most recent call last):
File "plugin.py", line 123, in closedDeviceConfigUi
File "plugin.py", line 189, in vehicleStatus2
File "plugin.py", line 204, in vehicleStatus2
NameError: global name 'HTTPError' is not defined


Jul 8, 2019 at 08:31:22
Reloading plugin "Tesla EV Control 1.0.10"
Stopping plugin "Tesla EV Control 1.0.10" (pid 88878)
Stopped plugin "Tesla EV Control 1.0.10"
Starting plugin "Tesla EV Control 1.0.10" (pid 32465)
Started plugin "Tesla EV Control 1.0.10"

Jul 8, 2019 at 08:31:41
Tesla EV Control Fetching vehicles...
Tesla EV Control 1 vehicles found
Tesla EV Control Tesla request doRefresh for vehicle 51432506199105159
Tesla EV Control Tesla request charge_state for vehicle 51432506199105159
Tesla EV Control Error Error in plugin execution UiClosed2:

Traceback (most recent call last):
File "plugin.py", line 123, in closedDeviceConfigUi
File "plugin.py", line 189, in vehicleStatus2
File "plugin.py", line 204, in vehicleStatus2
NameError: global name 'HTTPError' is not defined

Posted on
Mon Jul 08, 2019 10:13 am
howartp offline
Posts: 3628
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: NameError: global name 'HTTPError' is not defined

Brian, see my post above with new version.


Sent from my iPhone using Tapatalk Pro

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest