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

[BUG] python six module #19257

Closed
jafo65 opened this issue May 28, 2024 · 10 comments
Closed

[BUG] python six module #19257

jafo65 opened this issue May 28, 2024 · 10 comments
Labels

Comments

@jafo65
Copy link

jafo65 commented May 28, 2024

Installed latest maltrail 0.69 on Ubu 24.04 LTS

on trying to initate sensor.py

Traceback (most recent call last):
File "/opt/maltrail/sensor.py", line 33, in
from core.common import check_connection
File "/opt/maltrail/core/common.py", line 23, in
from core.settings import config
File "/opt/maltrail/core/settings.py", line 23, in
from thirdparty.six.moves import urllib as _urllib
ModuleNotFoundError: No module named 'thirdparty.six.moves'

updated all python modules to latest versions

@stamparm
Copy link
Owner

that same module six is included inside the Maltrail git repo (https://github.com/stamparm/maltrail/tree/master/thirdparty/six). in case that you did properly checkout the git repo and start the sensor with a proper environment (i.e. no fooling around with starting directory or smth like that), you would be able to start it out of the box

@icolab
Copy link

icolab commented May 30, 2024

Hi, I have the same issue (even if six is in the right place)
Thanks

@stamparm
Copy link
Owner

stamparm commented May 30, 2024

@icolab can you try the following (exact same lines to run, no modifications):

cd /tmp
wget "https://github.com/stamparm/maltrail/archive/refs/heads/master.zip"
unzip master.zip
cd maltrail-master
sudo -E python3 sensor.py

@icolab
Copy link

icolab commented May 30, 2024

Hi @stamparm,
Here is the output of the following commandes:

[tmp]# cd maltrail-master/
[maltrail-master]# ls
CHANGELOG LICENSE plugins server.py
CITATION.cff maltrail.conf README.md thirdparty
core maltrail-sensor.service requirements.txt trails
docker maltrail-server.service SECURITY.md
html misc sensor.py
[maltrail-master]# sudo -E python3 sensor.py
Traceback (most recent call last):
File "/tmp/maltrail-master/sensor.py", line 33, in
from core.common import check_connection
File "/tmp/maltrail-master/core/common.py", line 23, in
from core.settings import config
File "/tmp/maltrail-master/core/settings.py", line 23, in
from thirdparty.six.moves import urllib as _urllib
ModuleNotFoundError: No module named 'thirdparty.six.moves'

@stamparm
Copy link
Owner

stamparm commented Jun 3, 2024

i had one clean debian machine. did everything like above. can't reproduce the problem

@stamparm stamparm closed this as completed Jun 3, 2024
@IanNicki
Copy link

IanNicki commented Jun 9, 2024

I have exactly the same issue as @jafo65,
I am using a python3.12 virtual environment. Using sudo <path_python_venv>/bin/pip3 install pcapy-ng for and sudo <path_python_venv>/bin/python3 sensor.py.
Seems like the python-venv doesn't find the folder thirdparty

(py_venv) user@ubuntu:~/maltrail-master$ sudo ../py_venv/bin/python3 sensor.py 
Traceback (most recent call last):
  File "/home/user/maltrail-master/sensor.py", line 33, in <module>
    from core.common import check_connection
  File "/home/user/maltrail-master/core/common.py", line 23, in <module>
    from core.settings import config
  File "/home/user/maltrail-master/core/settings.py", line 23, in <module>
    from thirdparty.six.moves import urllib as _urllib
ModuleNotFoundError: No module named 'thirdparty.six.moves'

@MikhailKasimov MikhailKasimov reopened this Jun 9, 2024
@pierre-guillot
Copy link

I have the same problem with my archlinux and maltrail : using python3.12 and it not work with excatly the same error.

Downgrade to 3.11 and it work again.

Regards.

@MikhailKasimov
Copy link
Collaborator

MikhailKasimov commented Jun 21, 2024

@jafo65 @icolab @pierre-guillot @IanNicki Please, let us know if problem is solved with the latest revision of MT, which contains Miroslav's patch. Thank you!

@IanNicki
Copy link

@stamparm and @MikhailKasimov,
it runs like clockwork. Just tested it on Python 3.12.3
Thank you guys 👍

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

No branches or pull requests

6 participants