Matplotlib Plugin for Indigo 7 - New!

Posted on
Tue Nov 15, 2016 3:11 pm
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Matplotlib Plugin for Indigo 7 - New!

gonzalo.dios - I have that item also - I'm not sure it is a faulty item - if you look in your Matplotlib log folder you will likely find a log file with the name none.csv

Not saying your not on to something - but maybe this is always created as a placeholder - in any case, thanks for the idea - I'll delete it and see if that helps.

I hope to get this working OK - since it will be a great plugin

_______
Norm

Posted on
Tue Nov 15, 2016 3:21 pm
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Matplotlib Plugin for Indigo 7 - New!

Well, you might be on to something - I deleted mine and I could add a second CSV engine device - thanks so so much - I wonder were the None item and log files are coming from?

_______
Norm

Posted on
Tue Nov 15, 2016 4:20 pm
gonzalo.dios offline
Posts: 5
Joined: Mar 28, 2015

Re: Matplotlib Plugin for Indigo 7 - New!

That's great!

Now, we only need to know where this "None" item come from...

Posted on
Tue Nov 15, 2016 5:12 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

You all have been busy, and that's great! There's a couple things here and at least one (if not both of them) are my fault.

@norcoscia: The plugin restart that you saw is something that's been happening periodically with that version of the plugin and I think I've recently isolated the cause. It has to do with the way that the plugin is initialized--the details don't matter--but in my tests of the update, the random restarts seem to have stopped. The restarts can be ignored as they don't affect anything important. That fix will be in the next update.

@gonzalo.dios: Thanks for the note on the "None" data element. That was included so that the CSV Engine device would have dummy data available to construct the device configuration dialog the first time it's run. It's existence shouldn't affect the plugin's operation, but it sounds like it might be nonetheless. I will look at that code to (at a minimum) ignore the "None" entry so in the future a None.csv file will not be created. I'll also see about deleting the "None" record from the list after the first data element is saved (rendering the None element unnecessary) and respawn it in the rare circumstance that all the other elements are removed.

You should be able to delete the None element without issue (as you seem to have figured out on your own--sorry about that!) and will amend the instructions to boot.

Thanks to both of you!

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

[My Plugins] - [My Forums]

Posted on
Tue Nov 15, 2016 11:50 pm
rapamatic offline
Posts: 276
Joined: Aug 03, 2015
Location: Glencoe, IL

Re: Matplotlib Plugin for Indigo 7 - New!

I keep getting the following error message, about a pickle? Any ideas?

Code: Select all
Nov 15, 2016, 11:43:15 PM
   Reloading plugin "Matplotlib 0.2.00"
   Starting plugin "Matplotlib 0.2.00" (pid 33315)
   Matplotlib Error                Error in plugin execution InitializeMain:

Traceback (most recent call last):
  File "plugin.py", line 31, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/pyplot.py", line 24, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/colorbar.py", line 29, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/collections.py", line 23, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/backend_bases.py", line 50, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/textpath.py", line 11, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/font_manager.py", line 1356, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/font_manager.py", line 1341, in _rebuild
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/font_manager.py", line 989, in __init__
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/font_manager.py", line 318, in findSystemFonts
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/font_manager.py", line 274, in get_fontconfig_fonts
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1334, in _execute_child
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 1382, in loads
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 858, in load
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 966, in load_string
ValueError: insecure string pickle

   Stopping plugin "Matplotlib 0.2.00" (pid 33315)
   Stopped plugin "Matplotlib 0.2.00"



Sent from my iPhone using Tapatalk

Posted on
Wed Nov 16, 2016 6:54 am
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

rapamatic wrote:
I keep getting the following error message, about a pickle? Any ideas?

Had to research that one a bit as I hadn't seen it before. Your install is crashing when we try to import matplotlib.pyplot. Please try the following steps:

(1) From the Indigo Scripting Shell, please try the following command:
Code: Select all
import matplotlib.pyplot as plt
I suspect that it will generate the same error. Please let me know if that's not the case.

(2) Try rebooting the machine running the Indigo Server.

It seems that there can sometimes be issues with Matplotlib dependencies on Macs that don't generate the proper traceback and instead provide an insecure pickle error. My source; https://github.com/matplotlib/matplotlib/issues/5314/

- Issue #26083: Workaround a subprocess bug that raises an incorrect
"ValueError: insecure string pickle" exception instead of the actual
exception on some platforms such as Mac OS X when an exception raised
in the forked child process prior to the exec() was large enough that
it overflowed the internal errpipe_read pipe buffer.


Several users in that thread suggested that a reboot solved their issue. Please let me know how it goes.

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

[My Plugins] - [My Forums]

Posted on
Wed Nov 16, 2016 7:50 am
rapamatic offline
Posts: 276
Joined: Aug 03, 2015
Location: Glencoe, IL

Re: Matplotlib Plugin for Indigo 7 - New!

You were right on both counts. A simple reboot fixed my pickle.

Thanks!

Posted on
Wed Nov 16, 2016 8:02 am
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

rapamatic wrote:
You were right on both counts. A simple reboot fixed my pickle.

Thanks!


Good deal. Thanks for letting me know.

#ThingsThatSoundDirtyButAren't


Sent from my iPhone using Tapatalk

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

[My Plugins] - [My Forums]

Posted on
Wed Nov 16, 2016 10:24 am
Woetjes offline
Posts: 117
Joined: Apr 04, 2016
Location: Belgium

Re: Matplotlib Plugin for Indigo 7 - New!

Woetjes wrote:
I have the same problem, when I try to create a CSV for the NetAtmo device (temperature or CO2) , I get the same error messages.
I've created a CSV with a variable and value and that's working.


Hi Dave,

I let the variable run for a day or two and now I've added the temperature for the NetAtmo device in it and it's working - great! :)
I also encountered the 'plugin "Matplotlib 0.2.00" (pid 59433) unexpectedly stopped -- restarting in 5 seconds' error but a simple reload of the plugin fixed it.

Thanks for the great plugin!
Wouter

Posted on
Wed Nov 16, 2016 10:27 am
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Thanks Wouter. Glad to hear that things have turned around for you.

There are likely many places where the plugin can be improved so please let me know how you get on.


Sent from my iPhone using Tapatalk

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

[My Plugins] - [My Forums]

Posted on
Tue Nov 22, 2016 2:53 pm
Frakke offline
Posts: 97
Joined: May 05, 2016

Re: Matplotlib Plugin for Indigo 7 - New!

Hi All,

Can someone tell me what I'm doing wrong please?
I'm getting this error, see images.

Thanks!

Regards
Attachments
Screen Shot 2016-11-22 at 21.52.12.png
Screen Shot 2016-11-22 at 21.52.12.png (26.45 KiB) Viewed 3316 times
Screen Shot 2016-11-22 at 21.52.04.png
Screen Shot 2016-11-22 at 21.52.04.png (113.54 KiB) Viewed 3316 times
Screen Shot 2016-11-22 at 21.51.53.png
Screen Shot 2016-11-22 at 21.51.53.png (102.12 KiB) Viewed 3316 times

Posted on
Tue Nov 22, 2016 2:55 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Try deleting the .ui part of the device state.


Sent from my iPhone using Tapatalk

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

[My Plugins] - [My Forums]

Posted on
Tue Nov 22, 2016 2:56 pm
Frakke offline
Posts: 97
Joined: May 05, 2016

Re: Matplotlib Plugin for Indigo 7 - New!

DaveL17 wrote:
Try deleting the .ui part of the device state.


Sent from my iPhone using Tapatalk


Hi,

Still this error:
Matplotlib Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 2247, in runConcurrentThread
File "plugin.py", line 615, in refreshTheCSV
ValueError: invalid literal for int() with base 10: 'None'

Matplotlib Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Posted on
Tue Nov 22, 2016 4:41 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Sorry that you're still having trouble. Please open a scripting shell (Indigo Plugins Menu), execute the following code, and post the results.

Code: Select all
indigo.server.log(unicode(indigo.devices[402734223].states))

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

[My Plugins] - [My Forums]

Posted on
Wed Nov 23, 2016 5:26 am
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

@Frakke: Sorry, it was a long day yesterday.

Do you have a CSV Engine data element called 'None' that appears in the drop-down list? If so, please select and delete that element. Hopefully, that will get you going.

Dave

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

[My Plugins] - [My Forums]

Who is online

Users browsing this forum: No registered users and 3 guests