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

SOLVED - Mentalist Not Working in Python3.11 Onwards #41

Open
pitamah opened this issue Oct 5, 2024 · 1 comment
Open

SOLVED - Mentalist Not Working in Python3.11 Onwards #41

pitamah opened this issue Oct 5, 2024 · 1 comment

Comments

@pitamah
Copy link

pitamah commented Oct 5, 2024

First, install mentalist using
sudo python3 setup.py install

Then first, let's solve this error ->

AttributeError: module 'locale' has no attribute 'format'. Did you mean: '_format'?

  1. In VSCode (or your favorite text editor), Open /usr/local/lib/python3.12/dist-packages/Mentalist-1.0-py3.12.egg/mentalist/view/main.py.
  2. Search for locale.format
  3. Replace it with locale.format_string
  4. Repeat steps from 1 to 3 for file adder.py

Now, let's solve this ->

AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?

  1. Open /usr/local/lib/python3.12/dist-packages/Mentalist-1.0-py3.12.egg/mentalist/model.py
  2. Replace the whole function as below (Line approx- 456 to 468)
  3. Check for any indentation errors after pasting the code.
result = True
signature = inspect.signature(self.__class__.__init__)
param_names = [param.name for param in signature.parameters.values()]

for name in param_names:
    if name in ['self', 'controller']:
        continue
    if (name in other.__dict__) and (self.__dict__[name] != other.__dict__[name]):
        result = False

return result

If you are getting other locale related errors, run following commands.

export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales

Done!

Hope this helps. If you face any other issues, please comment below.

@freitas666
Copy link

Plz can u upload your file fixed?

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

2 participants