makehumancommunity / makehuman

This is the main repository for the MakeHuman application as such.
http://www.makehumancommunity.org
Other
1.18k stars 244 forks source link

Settings not loaded properly #223

Closed alfredorusso-github closed 1 week ago

alfredorusso-github commented 1 year ago

There is a bug that prevents changing the settings in MakeHuman. The bug is related to an error that occurs when MakeHuman is started, which prevents the settings from being correctly loaded. As a result, the default settings are created and utilized every time, and some plugins cannot be activated.

This issue needs to be addressed in order to enable changing the settings and activating all plugins.

The error is caused by the parseINI method in the /makehuman/lib/inifile.py file. In this method, json.loads(s, encoding='utf-8') is used. However, since Python 3.9, the encoding keyword argument is deprecated and it is no longer necessary to specify the encoding type. The method itself calls detect_encoding(), which is able to recognize the input encoding.

The solution for the bug that worked for me is the following: inifile.zip

Aranuvir commented 1 week ago

Strangely MakeHuman does not show an error on my system. Though I can reproduce the issue in a quick test in Python. Evaluating your explanation and checking the documentation this seems to be quite reasonable. Should be fixed soon...

Aranuvir commented 1 week ago

Should be fixed with commit 4f37318b1f052cb54fd88a129d65f044986ed751.

Closing. Could be reopened in case there are further issues.

black-punkduck commented 1 week ago

should be okay.

settings.ini usually can have two topics with none ASCII codes:

pathnames with special characters ... what about German "öffentlicher Ordner" ;)

Awful tags. And there we already have one. Makehuman + the TM symbol. But afaik it works with JSON.

The discussion what JSON can do or can't do in stackexchange is endless. It is usually more a problem around HTML or Java-Script or when APIs will classically deliver nothing (from daily business) but an error-code ...

the other .ini files are just tables and not JSON.

Aranuvir commented 1 week ago

Feel free to change the tags ;)

Btw, I had fixed that issue 4 years ago. And I cannot tell from the history how the code was reverted. Confusing.