MatPlotlib errors

Posted on
Mon Jul 18, 2022 7:59 am
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

MatPlotlib errors

Hi,

Setting everything up on a new machine in a new house so gradually replicating what I had on my old set-up. That included weather charts from Matplotlib and Fantastic Weather. However, I am getting this error:

Matplotlib Error [Hourly forecast chart] Error type: invalid literal for int() with base 10: ''
Matplotlib Error [Hourly forecast chart] error producing chart. See logs for more information.

Any simple fix?

LM

Posted on
Mon Jul 18, 2022 9:00 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: MatPlotlib errors

There's not enough here to diagnose the problem, but I can say that I'm not getting similar errors on either server.

1. Do you have a fully-configured Fantastic Weather Plugin *and* and fully-configured Hourly Forecast Device set up?
2. Is the Fantastic Weather Hourly Forecast Device populated with valid data in its states?

The error is saying that the Matplotlib Plugin can't convert the target Hourly Forecast state (which is an empty string) to an integer.

chart_forecast_hourly.png
chart_forecast_hourly.png (15.25 KiB) Viewed 2053 times

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

[My Plugins] - [My Forums]

Posted on
Mon Jul 18, 2022 9:09 am
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: MatPlotlib errors

I think the answer to both questions is yes.

Here is more from the log...

Code: Select all
2022-07-18 00:12:14.744   DEBUG        Plugin.charts_refresh               Updating chart: [Hourly forecast chart]
2022-07-18 00:12:14.772   DEBUG        Plugin.charts_refresh               [Hourly forecast chart] Sending to chart refresh process.
2022-07-18 00:12:15.287   DEBUG        Plugin.process_plotting_log         [Hourly forecast chart] payload unpacked successfully.
2022-07-18 00:12:15.287   DEBUG        Plugin.process_plotting_log         [Hourly forecast chart] Formatting dates.
2022-07-18 00:12:15.287   DEBUG        Plugin.process_plotting_log         [Hourly forecast chart] Formatting dates.
2022-07-18 00:12:15.287   DEBUG        Plugin.process_plotting_log         [Hourly forecast chart] Formatting dates.
2022-07-18 00:12:15.287   DEBUG        Plugin.process_plotting_log         [Hourly forecast chart] Formatting dates.
2022-07-18 00:12:15.287   DEBUG        Plugin.process_plotting_log         [Hourly forecast chart] Formatting dates.
2022-07-18 00:12:15.287   DEBUG        Plugin.process_plotting_log         [Hourly forecast chart] Formatting dates.
2022-07-18 00:12:15.287   DEBUG        Plugin.process_plotting_log         [Hourly forecast chart] Formatting dates.
2022-07-18 00:12:15.287   DEBUG        Plugin.process_plotting_log         [Hourly forecast chart] Formatting dates.
2022-07-18 00:12:15.287   DEBUG        Plugin.process_plotting_log         [Hourly forecast chart] Traceback (most recent call last):
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.1/Plugins/matplotlib.indigoPlugin/Contents/Server Plugin/chart_tools.py", line 519, in format_axis_y
    mtick.FormatStrFormatter(f"%.{int(p_dict.get('yAxisPrecision', '0'))}f")
ValueError: invalid literal for int() with base 10: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.1/Plugins/matplotlib.indigoPlugin/Contents/Server Plugin/chart_weather_forecast.py", line 174, in <module>
    chart_tools.format_axis_y(ax=ax1, p_dict=P_DICT, k_dict=K_DICT, logger=LOG)
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.1/Plugins/matplotlib.indigoPlugin/Contents/Server Plugin/chart_tools.py", line 545, in format_axis_y
    f"[{name}] %.{int(p_dict['yAxisPrecision'])}f"
ValueError: invalid literal for int() with base 10: ''
Attachments
Screenshot 2022-07-18 at 16.08.00.png
Screenshot 2022-07-18 at 16.08.00.png (100.69 KiB) Viewed 2047 times

Posted on
Mon Jul 18, 2022 9:27 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: MatPlotlib errors

Okay, we're zeroing in on it. Within the Matplotlib Chart Device, what is the setting for the 'Y Axis Precision'?

Also, what version of the plugin and what version of Indigo are you running?

Screen Shot 2022-07-18 at 10.25.17 AM-2.png
Screen Shot 2022-07-18 at 10.25.17 AM-2.png (194.97 KiB) Viewed 2044 times

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

[My Plugins] - [My Forums]

Posted on
Mon Jul 18, 2022 1:33 pm
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: MatPlotlib errors

Solved it with the Y1 formatting menu. Thanks for your help and sorry for having been a total muppet... Had missed that menu.

Posted on
Mon Jul 18, 2022 4:39 pm
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: MatPlotlib errors

It's not your fault. The plugin is a victim of its customizability. There are so many settings that I had to break them into groups to make them somewhat manageable. :D

Glad you were able to sort it out.

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

[My Plugins] - [My Forums]

Posted on
Mon Jul 18, 2022 4:40 pm
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: MatPlotlib errors

And if you're actually in London -- try to stay cool!

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

[My Plugins] - [My Forums]

Posted on
Fri Nov 18, 2022 9:15 pm
diefledermaus offline
Posts: 17
Joined: Feb 07, 2015

Re: MatPlotlib errors

I am running Indigo 2022.1.2 on OS 10.13.6 and I am unable to get matplotlib to function now I get a python error

Reloading plugin "Matplotlib 2022.1.4" using API v3.0
Starting plugin "Matplotlib 2022.1.4" (pid 13900)
Matplotlib Error Error in plugin execution InitializeMain:

File "plugin.py", line 41, in <module>
type: No module named 'numpy'

Stopping plugin "Matplotlib 2022.1.4" (pid 13900)
Stopped plugin "Matplotlib 2022.1.4"

Posted on
Sat Nov 19, 2022 5:35 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: MatPlotlib errors

Sorry to hear that you're having trouble. Indigo 2022.1 ships with numpy v1.22.3 (v1.16.6 for Python 2.7), which is installed with lots of other Python 3 packages, and should be available on your system. I'm running Catalina 10.15.7 on my server and the Matplotlib plugin runs fine. Indigo supports Sierra 10.12, so that should not be an issue. The Matplotlib plugin doesn't ship with any additional Python packages and it should work on your system. My first recommendation would be to re-run the Indigo installer to make sure that all the needed Python packages are installed in their proper locations. Do you have any other instances of Python installed on this machine (other than the ones that ship with Indigo?)

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 2 guests

cron