Page 1 of 1

NameError: global name 'HTTPError' is not defined

PostPosted: Mon Jul 01, 2019 12:00 pm
by shapa
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?

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

PostPosted: Mon Jul 01, 2019 1:21 pm
by howartp
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.

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

PostPosted: Thu Jul 04, 2019 6:02 pm
by shapa
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?

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

PostPosted: Mon Jul 08, 2019 7:45 am
by brianlloyd
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

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

PostPosted: Mon Jul 08, 2019 10:13 am
by howartp
Brian, see my post above with new version.


Sent from my iPhone using Tapatalk Pro