Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not import module iris_wazuhindexer_module: cannot import name 'AlertSchema' from 'app.schema.marshables' #5

Open
shaker402 opened this issue Mar 11, 2024 · 1 comment

Comments

@shaker402
Copy link

after updating the highlight docker name to from iris-webworker to iris-web-worker-1 and iriswebapp to iris-web-app-1 in the file buildnpush2iris.sh as shown inn the attatched image :
1

I have run it , and got the bellow output :

root@IRIS:~/iris-modules/iris-wazuhindexer-module# ./buildnpush2iris.sh -a
[BUILDnPUSH2IRIS] Pushing to Worker and App container!
[BUILDnPUSH2IRIS] Starting the build and push process..
running bdist_wheel
running build
running build_py
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/iris_wazuhindexer_module
copying build/lib/iris_wazuhindexer_module/IrisWazuhindexerConfig.py -> build/bdist.linux-x86_64/wheel/iris_wazuhindexer_module
copying build/lib/iris_wazuhindexer_module/init.py -> build/bdist.linux-x86_64/wheel/iris_wazuhindexer_module
creating build/bdist.linux-x86_64/wheel/iris_wazuhindexer_module/wazuhindexer_handler
copying build/lib/iris_wazuhindexer_module/wazuhindexer_handler/wazuhindexer_handler.py -> build/bdist.linux-x86_64/wheel/iris_wazuhindexer_module/wazuhindexer_handler
copying build/lib/iris_wazuhindexer_module/wazuhindexer_handler/init.py -> build/bdist.linux-x86_64/wheel/iris_wazuhindexer_module/wazuhindexer_handler
copying build/lib/iris_wazuhindexer_module/IrisWazuhindexerInterface.py -> build/bdist.linux-x86_64/wheel/iris_wazuhindexer_module
running install_egg_info
running egg_info
writing iris_wazuhindexer_module.egg-info/PKG-INFO
writing dependency_links to iris_wazuhindexer_module.egg-info/dependency_links.txt
writing requirements to iris_wazuhindexer_module.egg-info/requires.txt
writing top-level names to iris_wazuhindexer_module.egg-info/top_level.txt
reading manifest file 'iris_wazuhindexer_module.egg-info/SOURCES.txt'
writing manifest file 'iris_wazuhindexer_module.egg-info/SOURCES.txt'
Copying iris_wazuhindexer_module.egg-info to build/bdist.linux-x86_64/wheel/iris_wazuhindexer_module-0.1.0.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/iris_wazuhindexer_module-0.1.0.dist-info/WHEEL
creating 'dist/iris_wazuhindexer_module-0.1.0-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'iris_wazuhindexer_module/IrisWazuhindexerConfig.py'
adding 'iris_wazuhindexer_module/IrisWazuhindexerInterface.py'
adding 'iris_wazuhindexer_module/init.py'
adding 'iris_wazuhindexer_module/wazuhindexer_handler/init.py'
adding 'iris_wazuhindexer_module/wazuhindexer_handler/wazuhindexer_handler.py'
adding 'iris_wazuhindexer_module-0.1.0.dist-info/LICENSE'
adding 'iris_wazuhindexer_module-0.1.0.dist-info/METADATA'
adding 'iris_wazuhindexer_module-0.1.0.dist-info/WHEEL'
adding 'iris_wazuhindexer_module-0.1.0.dist-info/top_level.txt'
adding 'iris_wazuhindexer_module-0.1.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
[BUILDnPUSH2IRIS] Found latest module file: ./dist/iris_wazuhindexer_module-0.1.0-py3-none-any.whl
[BUILDnPUSH2IRIS] Copy module file to worker container..
Successfully copied 14.3kB to iris-web-worker-1:/iriswebapp/dependencies/iris_wazuhindexer_module-0.1.0-py3-none-any.whl
[BUILDnPUSH2IRIS] Installing module in worker container..
Processing ./dependencies/iris_wazuhindexer_module-0.1.0-py3-none-any.whl
Collecting iris-interface==1.2.0
Using cached iris_interface-1.2.0-py3-none-any.whl (11 kB)
Collecting elasticsearch7==7.10.1
Using cached elasticsearch7-7.10.1-py2.py3-none-any.whl (322 kB)
Collecting requests
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting pytz
Using cached pytz-2024.1-py2.py3-none-any.whl (505 kB)
Collecting setuptools==59.6.0
Using cached setuptools-59.6.0-py3-none-any.whl (952 kB)
Collecting urllib3<2,>=1.21.1
Using cached urllib3-1.26.18-py2.py3-none-any.whl (143 kB)
Collecting certifi
Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)
Collecting idna<4,>=2.5
Using cached idna-3.6-py3-none-any.whl (61 kB)
Collecting charset-normalizer<4,>=2
Using cached charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
Installing collected packages: pytz, iris-interface, urllib3, setuptools, idna, charset-normalizer, certifi, requests, elasticsearch7, iris-wazuhindexer-module
Attempting uninstall: pytz
Found existing installation: pytz 2024.1
Uninstalling pytz-2024.1:
Successfully uninstalled pytz-2024.1
Attempting uninstall: iris-interface
Found existing installation: iris-interface 1.2.0
Uninstalling iris-interface-1.2.0:
Successfully uninstalled iris-interface-1.2.0
Attempting uninstall: urllib3
Found existing installation: urllib3 1.26.18
Uninstalling urllib3-1.26.18:
Successfully uninstalled urllib3-1.26.18
Attempting uninstall: setuptools
Found existing installation: setuptools 59.6.0
Uninstalling setuptools-59.6.0:
Successfully uninstalled setuptools-59.6.0
Attempting uninstall: idna
Found existing installation: idna 3.6
Uninstalling idna-3.6:
Successfully uninstalled idna-3.6
Attempting uninstall: charset-normalizer
Found existing installation: charset-normalizer 3.3.2
Uninstalling charset-normalizer-3.3.2:
Successfully uninstalled charset-normalizer-3.3.2
Attempting uninstall: certifi
Found existing installation: certifi 2024.2.2
Uninstalling certifi-2024.2.2:
Successfully uninstalled certifi-2024.2.2
Attempting uninstall: requests
Found existing installation: requests 2.31.0
Uninstalling requests-2.31.0:
Successfully uninstalled requests-2.31.0
Attempting uninstall: elasticsearch7
Found existing installation: elasticsearch7 7.10.1
Uninstalling elasticsearch7-7.10.1:
Successfully uninstalled elasticsearch7-7.10.1
Attempting uninstall: iris-wazuhindexer-module
Found existing installation: iris-wazuhindexer-module 0.1.0
Uninstalling iris-wazuhindexer-module-0.1.0:
Successfully uninstalled iris-wazuhindexer-module-0.1.0

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
evtx2splunk 2.0.1 requires certifi==2021.10.8, but you have certifi 2024.2.2 which is incompatible.
evtx2splunk 2.0.1 requires idna==3.3, but you have idna 3.6 which is incompatible.
evtx2splunk 2.0.1 requires requests==2.26.0, but you have requests 2.31.0 which is incompatible.
Successfully installed certifi-2024.2.2 charset-normalizer-3.3.2 elasticsearch7-7.10.1 idna-3.6 iris-interface-1.2.0 iris-wazuhindexer-module-0.1.0 pytz-2024.1 requests-2.31.0 setuptools-59.6.0 urllib3-1.26.18

[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip
[BUILDnPUSH2IRIS] Restarting worker container..
iris-web-worker-1
[BUILDnPUSH2IRIS] Copy module file to app container..
Successfully copied 14.3kB to iris-web-app-1:/iriswebapp/dependencies/iris_wazuhindexer_module-0.1.0-py3-none-any.whl
[BUILDnPUSH2IRIS] Installing module in app container..
Processing ./dependencies/iris_wazuhindexer_module-0.1.0-py3-none-any.whl
Collecting requests
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting iris-interface==1.2.0
Using cached iris_interface-1.2.0-py3-none-any.whl (11 kB)
Collecting pytz
Using cached pytz-2024.1-py2.py3-none-any.whl (505 kB)
Collecting setuptools==59.6.0
Using cached setuptools-59.6.0-py3-none-any.whl (952 kB)
Collecting elasticsearch7==7.10.1
Using cached elasticsearch7-7.10.1-py2.py3-none-any.whl (322 kB)
Collecting urllib3<2,>=1.21.1
Using cached urllib3-1.26.18-py2.py3-none-any.whl (143 kB)
Collecting certifi
Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)
Collecting charset-normalizer<4,>=2
Using cached charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
Collecting idna<4,>=2.5
Using cached idna-3.6-py3-none-any.whl (61 kB)
Installing collected packages: pytz, iris-interface, urllib3, setuptools, idna, charset-normalizer, certifi, requests, elasticsearch7, iris-wazuhindexer-module
Attempting uninstall: pytz
Found existing installation: pytz 2024.1
Uninstalling pytz-2024.1:
Successfully uninstalled pytz-2024.1
Attempting uninstall: iris-interface
Found existing installation: iris-interface 1.2.0
Uninstalling iris-interface-1.2.0:
Successfully uninstalled iris-interface-1.2.0
Attempting uninstall: urllib3
Found existing installation: urllib3 1.26.18
Uninstalling urllib3-1.26.18:
Successfully uninstalled urllib3-1.26.18
Attempting uninstall: setuptools
Found existing installation: setuptools 59.6.0
Uninstalling setuptools-59.6.0:
Successfully uninstalled setuptools-59.6.0
Attempting uninstall: idna
Found existing installation: idna 3.6
Uninstalling idna-3.6:
Successfully uninstalled idna-3.6
Attempting uninstall: charset-normalizer
Found existing installation: charset-normalizer 3.3.2
Uninstalling charset-normalizer-3.3.2:
Successfully uninstalled charset-normalizer-3.3.2
Attempting uninstall: certifi
Found existing installation: certifi 2024.2.2
Uninstalling certifi-2024.2.2:
Successfully uninstalled certifi-2024.2.2
Attempting uninstall: requests
Found existing installation: requests 2.31.0
Uninstalling requests-2.31.0:
Successfully uninstalled requests-2.31.0
Attempting uninstall: elasticsearch7
Found existing installation: elasticsearch7 7.10.1
Uninstalling elasticsearch7-7.10.1:
Successfully uninstalled elasticsearch7-7.10.1
Attempting uninstall: iris-wazuhindexer-module
Found existing installation: iris-wazuhindexer-module 0.1.0
Uninstalling iris-wazuhindexer-module-0.1.0:
Successfully uninstalled iris-wazuhindexer-module-0.1.0

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the

source of the following dependency conflicts.
evtx2splunk 2.0.1 requires certifi==2021.10.8, but you have certifi 2024.2.2 which is incompatible.
evtx2splunk 2.0.1 requires idna==3.3, but you have idna 3.6 which is incompatible.
evtx2splunk 2.0.1 requires requests==2.26.0, but you have requests 2.31.0 which is incompatible.
Successfully installed certifi-2024.2.2 charset-normalizer-3.3.2 elasticsearch7-7.10.1 idna-3.6 iris-interface-1.2.0 iris-wazuhindexer-module-0.1.0 pytz-2024.1 requests-2.31.0 setuptools-59.6.0 urllib3-1.26.18

[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip
[BUILDnPUSH2IRIS] Restarting app container..
iris-web-app-1
[BUILDnPUSH2IRIS] Completed!
root@IRIS:~/iris-modules/iris-wazuhindexer-module#

when I try to add Module name iris_wazuhindexer_module :
can not add the model : Could not import module iris_wazuhindexer_module: cannot import name 'AlertSchema' from 'app.schema.marshables' (/iriswebapp/app/schema/marshables.py)

kindly , help me to solve this issue , please

@shaker402
Copy link
Author

image
I tray more and more ,and i can not solve the error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant