Page 1 of 1

[SOVLED] MFPB2 Gives Error When Listing Assets

PostPosted: Mon Nov 22, 2021 9:47 am
by Ian_Samit
After installing the MakeHuman System Assets (or any other assets), when trying to list the assets by clicking on the arrow next to an asset listed in MPFB2, I get the following error:

Code: Select all
Python: Traceback (most recent call last):
  File "/home/ian/.config/blender/2.93/scripts/addons/mpfb/ui/assetlibrary/assetlibrarypanel.py", line 100, in draw
    self._draw_section(scene, layout)
  File "/home/ian/.config/blender/2.93/scripts/addons/mpfb/ui/assetlibrary/assetlibrarypanel.py", line 36, in _draw_section
    items = AssetService.get_asset_list(self.asset_subdir, self.asset_type)
  File "/home/ian/.config/blender/2.93/scripts/addons/mpfb/services/assetservice.py", line 249, in get_asset_list
    AssetService.update_asset_list(asset_subdir, asset_type)
  File "/home/ian/.config/blender/2.93/scripts/addons/mpfb/services/assetservice.py", line 221, in update_asset_list
    if _ASSET_THUMBS is None:
UnboundLocalError: local variable '_ASSET_THUMBS' referenced before assignment

location: <unknown location>:-1

I also get the same error when I click the "Library Files" button under System and Resources, although the assets viewer (Gwenview in my case) opens to the correct directory.

At first I thought this was a directory location problem, but if I delete all the assets from both the MPFB user data and MakeHuman user data directories, I get no error, but the following notice:
MPFB2_no_assets.png
MPFB2_no_assets.png (15.65 KiB) Viewed 527 times


BTW: since this is really more of a bug report, is it better to post here, GitHub or both?

Re: MFPB2 Gives Error When Listing Assets

PostPosted: Wed Nov 24, 2021 2:25 pm
by joepal
Huh. That's bad.

Github is nice if you're comfortable with it, but the important part is communicating the error.

If you open the "developer" panel, you'll find a "log levels" sub panel. Could you go there and set the "default" log channel to "debug"? Then restart MPFB2, recreate the error, export the "default" log file (on the same panel) and attach that log file here?

Re: MFPB2 Gives Error When Listing Assets

PostPosted: Thu Nov 25, 2021 8:22 am
by Ian_Samit
Hi Joel,
Thanks for the support. I hope this is right.

I'm not sure if this is relevant but, for some context, both Blender and MH are sandboxed on my machine. My OS is OpenSuse 15.3, which still has Blender 2.82 by default, so I use the Snap version (2.93). Also, I have MH as an executable on a separate drive to the OS to avoid losing resources when updating the OS. And finally, after a tragic loss when I had to format my Home partition, I now keep my Documents directory on a different drive with a symlink from the Home directory.

Thanks again and please let me know if you need anything else.

Re: MFPB2 Gives Error When Listing Assets

PostPosted: Thu Nov 25, 2021 1:16 pm
by joepal
Is this a rather old version of MPFB2? Old as in at least a few weeks old? The stack trace says the crash happens with _ASSET_THUMBS on line 221, but that line is somewhere else in my current code.

If you're running an old version, can you download the latest version and see if it solves your problem?

Re: [SOVLED] MFPB2 Gives Error When Listing Assets

PostPosted: Thu Nov 25, 2021 4:56 pm
by Ian_Samit
Thanks Joel - yes that worked.

I thought about updating but as it had only been a few weeks since the last one, didn't think it was necessary.

Great to see how rapidly this software is being developed. :D