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

Downloaded clothes are not available to choose #210

Open K3NMA opened 1 year ago

K3NMA commented 1 year ago

Screenshot 2022-09-04 033311 Screenshot 2022-09-04 033431 Screenshot 2022-09-04 033520

Good day,

The clothes I downloaded from the community asset database are not available to choose in the application. This was working before. However, the application crashed and then I couldnt choose the clothes anymore. I tried reinstalling, deleting the catch, nothing worked. Please assist. See screenshots for more info.

joepal1976 commented 1 year ago

This seems like a bug that was fixed a while back. An asset contains illegal characters, and the clothes chooser did not take this into account.

Can you try installing the nightly build and see if it works for you using that?

Aranuvir commented 1 year ago

Unfortunately the problem was addressed only partially. The MakeHuman application itself assumes that any file to be read is "utf-8" encoded by hinting the "utf-8" option to the open()-function. However, any other tool that was built around MakeHuman does not use the encoding option, in which case the open()-function uses the result of locale.getpreferredencoding() of the operating system. In the end this will lead to the encoding conflicts, if the operating system uses a different encoding to write the file. Its not a big deal in *NIX-like environments where "utf-8" is the default anyway, but definitely problematic for assets created with Windows. One step to mitigate the problem would be the usage of the "utf-8" option in all tools, but in the end we will have to guess the encoding of some files to solve all remaining problems. Though I have done some benchmarking which the cardet library, which, IIRC, resulted in seconds to load a single file. Definitely not so appealing...

loluakinyemi commented 1 year ago

This seems like a bug that was fixed a while back. An asset contains illegal characters, and the clothes chooser did not take this into account.

Can you try installing the nightly build and see if it works for you using that?

how to I get the nightly build?

joepal1976 commented 1 year ago

The nightly build is here: https://download.tuxfamily.org/makehuman/nightly/

rwbaer commented 1 year ago

I don't know if this is helpful or even responsive to OPs issue. Having tried to help Joel support code pages during the python 3 transition, I think we learned that different parts of the MH code on Windows used different code pages for file opening than for other text processing. There may have even been more than one "other" code page. Windows at the time (and I guess still ) uses a UTF16 based encoding system. With the laterst versions, Windows 10 and Windows 11, Windows finally allows to set utf-8 as the default encoding, This support apparently requires the presence of Universal C Runtime (URCT) which is availble on the November 2019 update of windows and newer.

With the caution that I do not have extensive personal experience with this, here is how to access Windows unicode UTF-8 support:

loluakinyemi commented 1 year ago

The nightly build is here: https://download.tuxfamily.org/makehuman/nightly/

this worked for a moment but now I am back at it and I have tried reinstalling but no fix

loluakinyemi commented 1 year ago

I don't know if this is helpful or even responsive to OPs issue. Having tried to help Joel support code pages during the python 3 transition, I think we learned that different parts of the MH code on Windows used different code pages for file opening than for other text processing. There may have even been more than one "other" code page. Windows at the time (and I guess still ) uses a UTF16 based encoding system. With the laterst versions, Windows 10 and Windows 11, Windows finally allows to set utf-8 as the default encoding, This support apparently requires the presence of Universal C Runtime (URCT) which is availble on the November 2019 update of windows and newer.

With the caution that I do not have extensive personal experience with this, here is how to access Windows unicode UTF-8 support:

  • Window key + I to open "settings"
  • Time and Language
  • Language & region
  • Administrative language settings
  • Change system locale
  • CHECKBOX Beta: Use Unicode UTF-8 for worldwide language support

I have done this but still the same error of clothes not showing

black-punkduck commented 1 year ago

Hi I remember the following problem, It was this change:

https://github.com/makehumancommunity/makehuman/commit/b80494ade9d581e8ab39f387a1326be50f24d2aa

Please check, I had this file (and I was not the only one):

Jacket_T01.mhclo

the problem was created by this text

# description: Una remera generica, se adapta muy bien al cuerpo genérico femenino/A generic T-shirt, adapts very well to the generic female body

so that é crashed everything. In makeclothes one can enter a description and there we allowed everything ... and this could end tödlich/deadly ;)

Be aware that makehuman first creates a optimized version, but only once(!). Your optimized file was done by the old version. So please also delete mhpxy file and npz file in the clothes folder of the , because they were generated with the version with the missing utf conversion.

Another simple solution: open the file in the text editor and delete/modify the description in the mhclo file. In case that the file is edited or changed the mhpxy file and npz file is created again.

Or delete this asset to see if it works. If it is a newer asset, then it could be another mhpxy file of course ...

If nothing works: double your folder with the clothes into a backup folder, delete everything in clothes folder and start copying clothes back until it crashes. But I hope it was that file.

Greetings punkduck