Error related to internet being interrupted

Posted on
Tue May 17, 2022 2:04 pm
Monstergerm offline
Posts: 274
Joined: Sep 01, 2009

Error related to internet being interrupted

Hi Dave

Thanks for an amazing plugin and keeping it up-to-date. I installed latest version 2022.0.1 and got this error today, repeated a few times. At the same time I got various other messages that there are issues with the internet connection

GhostXML Error [WF Doug Hill Ct Weather (GhostXML)] Parse Error:
Traceback (most recent call last):
File "plugin.py", line 1257, in parse_the_json
parsed_json = json.loads(root)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
GhostXML Warning [WF Doug Hill Ct Weather (GhostXML)] There was a parse error. Will continue to poll. Check the plugin log for more information.

Posted on
Tue May 17, 2022 2:19 pm
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Error related to internet being interrupted

Thanks for the heads up. Hopefully, the plugin is able to recover from this error on its own.

I'll take a look.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue May 17, 2022 2:46 pm
Monstergerm offline
Posts: 274
Joined: Sep 01, 2009

Re: Error related to internet being interrupted

Yes, plugin recovers.

and here is another error, this one happens I think when there is something keeping the Indigo Server very busy. I have not figure out what is causing it.

GhostXML Error General exception
Traceback (most recent call last):
File "plugin.py", line 473, in runConcurrentThread
if dev.name != indigo.devices[dev_id].name:
RuntimeError: ServerCommunicationError -- timeout waiting for response
GhostXML Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Posted on
Tue May 17, 2022 2:52 pm
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Error related to internet being interrupted

That second error is going to take a bit of context. Let me know if you see anything that looks suspicious.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue May 17, 2022 5:34 pm
Monstergerm offline
Posts: 274
Joined: Sep 01, 2009

Re: Error related to internet being interrupted

Sorry, another bug.

Reproducible:
Create new GhostXML device
Select string model (probably happens with Real model too)
Do not complete setup of device.
Close Device setup with save button.
A new device appears in the Indigo UI, grayed out, status false.
Delete device in Indigo UI.
The below error appears and repeats itself until the plugin is restarted. Key ID is the device ID for the just deleted device.


GhostXML Error General exception
Traceback (most recent call last):
File "plugin.py", line 473, in runConcurrentThread
if dev.name != indigo.devices[dev_id].name:
KeyError: 'key id 1382069198 not found in database'
GhostXML Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Posted on
Tue May 17, 2022 7:07 pm
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Error related to internet being interrupted

That one has probably been there for the entire time. I'll take a look at that one as well.

If you're curious, the plugin maintains a list of device ID's that the plugin "owns" and apparently they're being added to the list even when they're not fully configured. Should be a straight-forward fix.

Thanks for letting me know.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue May 17, 2022 7:52 pm
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Error related to internet being interrupted

1. The json.decoder error logging issue has been addressed. The warning will still be printed to the log:
----> "GhostXML Warning [WF Doug Hill Ct Weather (GhostXML)] There was a parse error. Will continue to poll. Check the plugin log for more information."
but all the rest of the error message will not.

2. The device deleted bug is fixed. Both will be in the next release.

3. The third issue is a bit of code where the plugin checks with the Indigo server to see if the device's name has been changed and, if yes, updates the local copy of the device. I'm working on a potential fix for the resulting RuntimeError when the Indigo server is busy that may not require broader context.

Interestingly, I don't think any of these are as a result of porting to Python 3.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed May 18, 2022 9:19 am
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Error related to internet being interrupted

I've released an update to the plugin that addresses the first two issues above.

After reviewing the third issue (runtimeError) and discussing it with the Indigo dudes, we've come to the conclusion that it's probably best not to trap the error as it's indicative of a broader problem that needs to be addressed. Trapping the error would mask the underlying problem. There is a chance that the underlying problem is with the GhostXML plugin or with another plugin. I don't think it's the GhostXML plugin as it's waiting on the Indigo server and not the other way around. I could be mistaken about that, though.

The updated version (v2022.1.1) is available in the Indigo Plugin Store.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests