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

NameError: name 'settings' is not defined & ModuleNotFoundError: No module named 'src.thirdparty.six.moves' #885

Closed
Abhishek-Dirisipo opened this issue Jan 13, 2024 · 10 comments

Comments

@Abhishek-Dirisipo
Copy link

What's the problem (or question)?

when i try to run commix, this error occurs:

Traceback (most recent call last):
File "/Users/abhishek/BB/tools/commix/commix.py", line 18, in
import("src.utils.version")
File "/Users/abhishek/BB/tools/commix/src/utils/version.py", line 17, in
from src.utils import settings
File "/Users/abhishek/BB/tools/commix/src/utils/settings.py", line 26, in
from src.thirdparty.six.moves import urllib as _urllib
ModuleNotFoundError: No module named 'src.thirdparty.six.moves'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/abhishek/BB/tools/commix/commix.py", line 25, in
print(settings.print_critical_msg(err_msg))
^^^^^^^^
NameError: name 'settings' is not defined

Do you have an idea for a solution?

no

How can we reproduce the issue?

  1. use mac with latest python 3.12.1
  2. try to run commix.py with python3
  3. the error will occur

What are the running context details?

  • Installation method (e.g. apt-get, git clone or zip/tar.gz): git clone

  • Client OS (e.g. Linux (Ubuntu)): mac os

  • Program version (python commix.py --version or commix --version depending on installation): python 3.12.1

  • Relevant console output (if any):

Traceback (most recent call last):
File "/Users/abhishek/BB/tools/commix/commix.py", line 18, in
import("src.utils.version")
File "/Users/abhishek/BB/tools/commix/src/utils/version.py", line 17, in
from src.utils import settings
File "/Users/abhishek/BB/tools/commix/src/utils/settings.py", line 26, in
from src.thirdparty.six.moves import urllib as _urllib
ModuleNotFoundError: No module named 'src.thirdparty.six.moves'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/abhishek/BB/tools/commix/commix.py", line 25, in
print(settings.print_critical_msg(err_msg))
^^^^^^^^
NameError: name 'settings' is not defined

@Abhishek-Dirisipo Abhishek-Dirisipo changed the title NameError: name 'settings' is not defined NameError: name 'settings' is not defined & ModuleNotFoundError: No module named 'src.thirdparty.six.moves' Jan 13, 2024
@stasinopoulos
Copy link
Member

Hey, @Abhishek-Dirisipo sorry, but I am not able to reproduce the reported issue.
Try to update commix to the latest (dev) version and/or use different version of Python and check again.

@Abhishek-Dirisipo
Copy link
Author

i re-installed python3.12.1(latest) and re-cloned the latest commix . it still shows me the same error.

@stasinopoulos
Copy link
Member

stasinopoulos commented Jan 14, 2024

This is some kind of environment issue (that i am not able to reproduce) similar with #871.
I would suggest to run commix on Linux VM (i.e. Kali Linux etc)

@Abhishek-Dirisipo
Copy link
Author

so , it is an issue with mac i think.

@stasinopoulos
Copy link
Member

FYI, i just run commix (v3.9-dev#43) on my OSX w/ Python version 3.9.14.
Untitled

@dkmcgrath
Copy link

This seems to be a problem when the six library is already installed. Changing the imports via

find $COMMIX_ROOT -iname "*.py" -exec sed -i '' 's/from src.thirdparty.six.moves import/from six.moves import/g' {} \;

fixed this issue for me.

@Abhishek-Dirisipo
Copy link
Author

Abhishek-Dirisipo commented Apr 3, 2024 via email

@stasinopoulos
Copy link
Member

3 12_error_confirmed

Confirmed that this error occurred with latest python version (i.e. 3.12).

@stasinopoulos stasinopoulos self-assigned this May 13, 2024
@stasinopoulos stasinopoulos added this to the 4.0-stable milestone May 13, 2024
@stasinopoulos
Copy link
Member

Untitled

@Abhishek-Dirisipo
Copy link
Author

Thank you , now it is perfectly working fine

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

No branches or pull requests

3 participants