Matplotlib restarting and restarting

Posted on
Thu Dec 15, 2016 9:22 pm
Different Computers offline
User avatar
Posts: 1839
Joined: Jan 02, 2016
Location: East Coast

Matplotlib restarting and restarting

Restarted the host machine for other reasons and looks like since then I've been getting this over and over. Unsure if this is IndigoplotD or MatplotLib.
Code: Select all
   INDIGOplotD Error               plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
   Matplotlib                      Your plugin version, v0.2.04, is current.
   Indigo Cocoa client connected
   INDIGOplotD                     initialized
   INDIGOplotD Error               Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 4794, in runConcurrentThread
  File "plugin.py", line 1078, in createPy
AttributeError: 'Plugin' object has no attribute 'gnuPlotBin'


and when I stopped IndigoplotD:
Code: Select all
 Stopped plugin "INDIGOplotD 3.3.4"
   Error                           plugin "Matplotlib 0.2.04" (pid 9790) unexpectedly stopped -- restarting in 20 seconds

Dec 15, 2016, 10:16:33 PM
   Reloading plugin "Matplotlib 0.2.04"
   Starting plugin "Matplotlib 0.2.04" (pid 9903)
   Started plugin "Matplotlib 0.2.04"
   Matplotlib                      Your plugin version, v0.2.04, is current.

Dec 15, 2016, 10:17:33 PM
   Error                           plugin "Matplotlib 0.2.04" (pid 9903) unexpectedly stopped -- restarting in 20 seconds


Edit: looks like it only restarted a few times. Should MatplotLib and IndigoplotD get along?

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Posted on
Thu Dec 15, 2016 10:22 pm
DaveL17 offline
User avatar
Posts: 4200
Joined: Aug 20, 2013

Re: Matplotlib restarting and restarting

Different Computers wrote:
Edit: looks like it only restarted a few times. Should MatplotLib and IndigoplotD get along?

They most likely don't even know each other exist.

Throughout development, I have seen that behavior from matplotlib (the charting engine) and haven't been able to isolate a cause. I get those restarts from time to time, but the only things that seem to be even somewhat consistent are 1) instances where the Indigo server is accessed from a client, the client is put to sleep without disconnecting from the server, and then is reconnected (i.e., working on Indigo from a laptop and closing the lid without disconnecting first), and 2) general low memory situations. Restarts seem to be most common when the plugin is sleeping.

The restarts aren't going to hurt anything. But they are marginally annoying.

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

[My Plugins] - [My Forums]

Posted on
Fri Dec 16, 2016 9:16 am
kw123 offline
User avatar
Posts: 5840
Joined: May 12, 2013
Location: Dallas, TX

Re: Matplotlib restarting and restarting

Different Computers :
Traceback (most recent call last):
File "plugin.py", line 4794, in runConcurrentThread
File "plugin.py", line 1078, in createPy
AttributeError: 'Plugin' object has no attribute 'gnuPlotBin'

That seems to be a very old version(2 years old). This error has nothing to do with anything else but a variable was not declared in indigoplotD.
I suggest to upgrade to the most recent version.: 4.16.17

Dave: as for matplotlib restarts.. IndigoplotD runs the matplotlib in a separate py program (initially due to the fact that indigo did not support python 2.6) But it has the additional advantage: MATPLOT has a memory leak and after ~ 100-1000 cycles depending on complexity of the graphs generated it consumes too much memory, so THAT py program is recycled every 100 cycles -- it restarts itself.

Karl

Posted on
Fri Dec 16, 2016 9:48 am
Different Computers offline
User avatar
Posts: 1839
Joined: Jan 02, 2016
Location: East Coast

Re: Matplotlib restarting and restarting

Code: Select all
  Matplotlib                      Your plugin version, v0.2.04, is current.


Also the plugin download page says "Matplotlib Plugin v0.2.02 is now available."

So I guess there was a bug in versioning? does that link at viewtopic.php?f=219&t=17288 actually go to the current version? The one I just downloaded from that link is dated May of 2014.

Am I misunderstanding? do you mean the plugin version, or Matplotlib itself?

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Posted on
Fri Dec 16, 2016 4:52 pm
DaveL17 offline
User avatar
Posts: 4200
Joined: Aug 20, 2013

Re: Matplotlib restarting and restarting

kw123 wrote:
Dave: as for matplotlib restarts.. IndigoplotD runs the matplotlib in a separate py program (initially due to the fact that indigo did not support python 2.6) But it has the additional advantage: MATPLOT has a memory leak and after ~ 100-1000 cycles depending on complexity of the graphs generated it consumes too much memory, so THAT py program is recycled every 100 cycles -- it restarts itself.

Karl

Thanks Karl - I'll take a look at your plugin and see if I can steal your idea.

The things I currently do:
Code: Select all
plt.close('all')  # after each plot is generated

gc.collect()  # garbage collection after each plugin cycle, before calling sleep

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

[My Plugins] - [My Forums]

Posted on
Fri Dec 16, 2016 4:55 pm
DaveL17 offline
User avatar
Posts: 4200
Joined: Aug 20, 2013

Re: Matplotlib restarting and restarting

Different Computers wrote:
Also the plugin download page says "Matplotlib Plugin v0.2.02 is now available."


That's the Matplotlib plugin (mine). The error you reported:
Code: Select all
   INDIGOplotD Error               Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 4794, in runConcurrentThread
  File "plugin.py", line 1078, in createPy
AttributeError: 'Plugin' object has no attribute 'gnuPlotBin'

Is the IndigoPlotD plugin which is Karl's. Both plugins use Matplotlib. You can tell where the error came from in the traceback: "INDIGOplotD Error".

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

[My Plugins] - [My Forums]

Posted on
Fri Dec 16, 2016 4:56 pm
Different Computers offline
User avatar
Posts: 1839
Joined: Jan 02, 2016
Location: East Coast

Re: Matplotlib restarting and restarting

Whoops! Thanks.

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Posted on
Fri Dec 16, 2016 4:57 pm
DaveL17 offline
User avatar
Posts: 4200
Joined: Aug 20, 2013

Re: Matplotlib restarting and restarting

Different Computers wrote:
Whoops! Thanks.

No problem!

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 1 guest