|
Post by Jason on Jul 18, 2022 4:29:10 GMT -8
Just to confirm, you're still seeing the error message to change how the Dash libraries are being imported within your Python script? Or you are still seeing the pandas numpy error?
Thanks,
Jason
|
|
|
Post by Powderjockey on Jul 18, 2022 8:22:52 GMT -8
Jason, It starts out with the Dash error stating it is decpreciated (ver 2.6.0) and then it seems to go into the pandas problem and back to the commend prrompt. I've placed the problem below
pi@Pi-In-A-Rack:~/SDL_Pi_WeatherSense/dash_app $ sudo python3 index.py
/home/pi/SDL_Pi_WeatherSense/dash_app/index.py:5: UserWarning:
The dash_core_components package is deprecated. Please replace
`import dash_core_components as dcc` with `from dash import dcc`
import dash_core_components as dcc
/home/pi/SDL_Pi_WeatherSense/dash_app/index.py:6: UserWarning:
The dash_html_components package is deprecated. Please replace
`import dash_html_components as html` with `from dash import html`
import dash_html_components as html
Traceback (most recent call last):
File "/home/pi/SDL_Pi_WeatherSense/dash_app/index.py", line 32, in <module>
import solarmax_page
File "/home/pi/SDL_Pi_WeatherSense/dash_app/solarmax_page.py", line 6, in <module>
import pandas as pd
File "/usr/local/lib/python3.9/dist-packages/pandas/__init__.py", line 22, in <module>
from pandas.compat import is_numpy_dev as _is_numpy_dev
File "/usr/local/lib/python3.9/dist-packages/pandas/compat/__init__.py", line 15, in <module>
from pandas.compat.numpy import (
File "/usr/local/lib/python3.9/dist-packages/pandas/compat/numpy/__init__.py", line 4, in <module>
from pandas.util.version import Version
File "/usr/local/lib/python3.9/dist-packages/pandas/util/__init__.py", line 1, in <module>
from pandas.util._decorators import ( # noqa:F401
File "/usr/local/lib/python3.9/dist-packages/pandas/util/_decorators.py", line 14, in <module>
from pandas._libs.properties import cache_readonly # noqa:F401
File "/usr/local/lib/python3.9/dist-packages/pandas/_libs/__init__.py", line 13, in <module>
from pandas._libs.interval import Interval
File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 48 from C header, got 40 from PyObject
pi@Pi-In-A-Rack:~/SDL_Pi_WeatherSense/dash_app $ This is the same error whether the version of Dash is 2.6.0 or 1.21.0
|
|
Sopwith
Junior Member

"If it works out of the box - what fun is that?"
Posts: 69
Raspberry Pi: Yes
Other Device: Pico Pi
|
Post by Sopwith on Jul 18, 2022 9:08:45 GMT -8
|
|
|
Post by Powderjockey on Jul 18, 2022 9:59:36 GMT -8
I'm comfortable enough to go in and change things to the Dash 2.0 import statements. I give that a go and report back. I'll backup the script first!! Thanks Scott
|
|
|
Post by Powderjockey on Jul 18, 2022 18:45:05 GMT -8
OK, Fooling around with the dash app, it appears to be cleaned up and now is leaving the problem with the pandas app. Below is the error
pi@Pi-In-A-Rack:~/SDL_Pi_WeatherSense/dash_app $ sudo python3 index.py Traceback (most recent call last): File "/home/pi/SDL_Pi_WeatherSense/dash_app/index.py", line 34, in <module> import solarmax_page File "/home/pi/SDL_Pi_WeatherSense/dash_app/solarmax_page.py", line 6, in <module> import pandas as pd File "/usr/local/lib/python3.9/dist-packages/pandas/__init__.py", line 22, in <module> from pandas.compat import is_numpy_dev as _is_numpy_dev File "/usr/local/lib/python3.9/dist-packages/pandas/compat/__init__.py", line 15, in <module> from pandas.compat.numpy import ( File "/usr/local/lib/python3.9/dist-packages/pandas/compat/numpy/__init__.py", line 4, in <module> from pandas.util.version import Version File "/usr/local/lib/python3.9/dist-packages/pandas/util/__init__.py", line 1, in <module> from pandas.util._decorators import ( # noqa:F401 File "/usr/local/lib/python3.9/dist-packages/pandas/util/_decorators.py", line 14, in <module> from pandas._libs.properties import cache_readonly # noqa:F401 File "/usr/local/lib/python3.9/dist-packages/pandas/_libs/__init__.py", line 13, in <module> from pandas._libs.interval import Interval File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 48 from C header, got 40 from PyObject
|
|
Sopwith
Junior Member

"If it works out of the box - what fun is that?"
Posts: 69
Raspberry Pi: Yes
Other Device: Pico Pi
|
Post by Sopwith on Jul 18, 2022 19:21:16 GMT -8
|
|
|
Post by Powderjockey on Jul 18, 2022 19:24:05 GMT -8
I think I've fixed the problem. I uninstalled pandas and re-installed and it seems to work. I think it installed a newer version as well.  
|
|
Sopwith
Junior Member

"If it works out of the box - what fun is that?"
Posts: 69
Raspberry Pi: Yes
Other Device: Pico Pi
|
Post by Sopwith on Jul 18, 2022 19:46:28 GMT -8
This is great news.
Sopwith
|
|
|
Post by Jason on Jul 19, 2022 5:24:44 GMT -8
I think I've fixed the problem. I uninstalled pandas and re-installed and it seems to work. I think it installed a newer version as well. View AttachmentView AttachmentYeah pandas is a pain as well. I found success installing pandas using the apt package python3-pandas instead of pip installing pandas. Glad to see its working for you! Thanks, Jason
|
|
|
Post by Powderjockey on Jul 19, 2022 10:02:28 GMT -8
Thanks for the help, both of you. Now I need to move on from Blynk and find something else. I see a few post around here on the subject.
|
|