You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/usr/local/bin/ds4drv", line 33, in
sys.exit(load_entry_point('ds4drv==0.5.1', 'console_scripts', 'ds4drv')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/bin/ds4drv", line 25, in importlib_load_entry_point
return next(matches).load()
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/metadata/init.py", line 205, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/usr/local/lib/python3.12/dist-packages/ds4drv-0.5.1-py3.12.egg/ds4drv/main.py", line 6, in
File "/usr/local/lib/python3.12/dist-packages/ds4drv-0.5.1-py3.12.egg/ds4drv/actions/init.py", line 1, in
File "/usr/local/lib/python3.12/dist-packages/ds4drv-0.5.1-py3.12.egg/ds4drv/action.py", line 1, in
File "/usr/local/lib/python3.12/dist-packages/ds4drv-0.5.1-py3.12.egg/ds4drv/config.py", line 72, in
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
The text was updated successfully, but these errors were encountered:
The issue arises because configparser.SafeConfigParser has been removed in modern Python versions (3.2 and above). It should be replaced with configparser.ConfigParser to maintain compatibility.
Proposed Fix:
Replace all instances of configparser.SafeConfigParser with configparser.ConfigParser. Additionally, ensure that method calls like sections() are updated to reference the correct class.
class Config(configparser.ConfigParser):
def load(self, filename):
self.read([filename])
def section_to_args(self, section):
args = []
for key, value in self.section(section).items():
if value.lower() == "true":
args.append("--{0}".format(key))
elif value.lower() == "false":
pass
else:
args.append("--{0}={1}".format(key, value))
return args
def sections(self, prefix=None):
for section in configparser.ConfigParser.sections(self): # Updated SafeConfigParser
match = re.match(r"{0}:(.+)".format(prefix), section)
if match:
yield match.group(1), section
Traceback (most recent call last):
File "/usr/local/bin/ds4drv", line 33, in
sys.exit(load_entry_point('ds4drv==0.5.1', 'console_scripts', 'ds4drv')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/bin/ds4drv", line 25, in importlib_load_entry_point
return next(matches).load()
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/metadata/init.py", line 205, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/usr/local/lib/python3.12/dist-packages/ds4drv-0.5.1-py3.12.egg/ds4drv/main.py", line 6, in
File "/usr/local/lib/python3.12/dist-packages/ds4drv-0.5.1-py3.12.egg/ds4drv/actions/init.py", line 1, in
File "/usr/local/lib/python3.12/dist-packages/ds4drv-0.5.1-py3.12.egg/ds4drv/action.py", line 1, in
File "/usr/local/lib/python3.12/dist-packages/ds4drv-0.5.1-py3.12.egg/ds4drv/config.py", line 72, in
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
The text was updated successfully, but these errors were encountered: