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

AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'? #208

Open
BrunoRochaDev opened this issue Mar 28, 2024 · 1 comment

Comments

@BrunoRochaDev
Copy link

Exception when trying to run.

user@machine:~$ ds4drv
Traceback (most recent call last):
  File "/usr/local/bin/ds4drv", line 5, in <module>
    from ds4drv.__main__ import main
  File "/usr/local/lib/python3.12/site-packages/ds4drv/__main__.py", line 5, in <module>
    from .actions import ActionRegistry
  File "/usr/local/lib/python3.12/site-packages/ds4drv/actions/__init__.py", line 1, in <module>
    from ..action import ActionRegistry
  File "/usr/local/lib/python3.12/site-packages/ds4drv/action.py", line 1, in <module>
    from .config import add_controller_option
  File "/usr/local/lib/python3.12/site-packages/ds4drv/config.py", line 72, in <module>
    class Config(configparser.SafeConfigParser):
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

Installed using sudo pip install ds4drv.

Fedora Workstation 39. Python Python 3.12.2.

@Kompreya
Copy link

Kompreya commented Apr 1, 2024

The solution to this is to navigate to /usr/local/lib/python3.12/site-packages/ds4drv/config.pyand modify lines 72 and 99 from SafeConfigParser to ConfigParser

Save and run again.

Also, on Fedora, you may run into an error regarding hcitools. If that's the case, then you need to install bluez-deprecated off the rpm, which includes hcitools.

ds4drv seems to be very old and has not been updated for modern versions of python or bluez, but should still work nonetheless.

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