You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered two minor problem in the Dockerfile instruction provided :
the first is easily fix: docker build -t alwrity -f "Getting Started/Option_3_Docker_Install/Dockerfile" . the path of the docker file changed
The second here, I was not able to solve it. I tried to change the base image ( upgrade to 3.12-slim ) and change the requirements.txt file, but I didn't manage.
Not sure what is wrong. There must be some requirements that keep pulling in the wrong version of panda-ta
ImportError: cannot import name 'NaN' from 'numpy' (/usr/local/lib/python3.12/site-packages/numpy/__init__.py)
Traceback:
File "/app/alwrity.py", line 81, in <module>
from lib.utils.ui_setup import setup_ui, setup_alwrity_ui
File "/app/lib/utils/ui_setup.py", line 10, in <module>
from lib.utils.alwrity_utils import ai_social_writer
File "/app/lib/utils/alwrity_utils.py", line 11, in <module>
from lib.ai_writers.ai_finance_report_generator.ai_financial_dashboard import get_dashboard
File "/app/lib/ai_writers/ai_finance_report_generator/ai_financial_dashboard.py", line 22, in <module>
from ...ai_web_researcher.finance_data_researcher import get_finance_data, get_fin_options_data
File "/app/lib/ai_web_researcher/finance_data_researcher.py", line 4, in <module>
import pandas_ta as ta
File "/usr/local/lib/python3.12/site-packages/pandas_ta/__init__.py", line 116, in <module>
from pandas_ta.core import *
File "/usr/local/lib/python3.12/site-packages/pandas_ta/core.py", line 18, in <module>
from pandas_ta.momentum import *
File "/usr/local/lib/python3.12/site-packages/pandas_ta/momentum/__init__.py", line 34, in <module>
from .squeeze_pro import squeeze_pro
File "/usr/local/lib/python3.12/site-packages/pandas_ta/momentum/squeeze_pro.py", line 2, in <module>
from numpy import NaN as npNaN
It would also be great if you can also release the app as a docker image on dockerhub or similar services, and maybe
provide a ready to use docker-compose file for a quick local installation and testing.
regards
The text was updated successfully, but these errors were encountered:
@abate@uniqueumesh
I am looking into it and will update and fix it by tomorrow.
Not easily reproducible at my end, but I can acknowledge the bug as relevant.
The Dockerfile uses Python 3.12 for build, but Python 3.11-slim for runtime (this can cause subtle issues).
The error is due to an incompatibility between recent numpy versions (1.24+) and older pandas-ta versions, which try to import NaN from numpy (removed in numpy 1.24).
Solution:
Pin pandas-ta to a version compatible with numpy 1.24+ (e.g., pandas-ta>=0.3.14b0,!=0.3.14b0,>=0.3.15), or downgrade numpy to <1.24.
Also, use the same Python version in both build and runtime stages in Dockerfile.
requirements.txt: pandas-ta is now pinned to >=0.3.15 for compatibility with numpy >=1.24.0.
Dockerfile: Both build and runtime stages now use Python 3.12 for consistency.
docker-compose.yml: Added for easy local installation and testing. You can now run the app with:
cd "Getting Started/Option_3_Docker_Install"
docker-compose up --build
For Docker Hub release, you can build and push the image with:
Uh oh!
There was an error while loading. Please reload this page.
Hello devs :)
I encountered two minor problem in the Dockerfile instruction provided :
docker build -t alwrity -f "Getting Started/Option_3_Docker_Install/Dockerfile" .
the path of the docker file changedThe second here, I was not able to solve it. I tried to change the base image ( upgrade to 3.12-slim ) and change the requirements.txt file, but I didn't manage.
Not sure what is wrong. There must be some requirements that keep pulling in the wrong version of panda-ta
It would also be great if you can also release the app as a docker image on dockerhub or similar services, and maybe
provide a ready to use docker-compose file for a quick local installation and testing.
regards
The text was updated successfully, but these errors were encountered: