OliverJPost / HumGen3D

Main code of the Human Generator 3D add-on for Blender
GNU General Public License v3.0
79 stars 14 forks source link

V4 Beta 4 Python Error when activating #38

Closed radman-x closed 1 year ago

radman-x commented 1 year ago

Describe the bug When activating the HG V4 Beta 4 add-on, get a python error.

To Reproduce Steps to reproduce the behavior:

  1. Go to HG Github repo and download v4.beta.4 (ie, https://github.com/OliverJPost/HumGen3D/releases/tag/v4.beta.4)
  2. Open Blender v3.4 (latest)
  3. Go to Edit|Preferences|Add-ons|Install...
  4. Navigate to above file and install it.
  5. Click on checkbox to the left of "Human Generator 3D".
  6. Get Python error and it doesn't activate.
  7. See error below:

Read prefs: C:\Users\Bruce A. Rady\AppData\Roaming\Blender Foundation\Blender\3.4\config\userpref.blend Reloading external rigs... Reloading external metarigs... HG_INFO: Activating HumGen, version (4, 0, 1) HG_WARNING: Could not remove F:\Blender3Data\HumanGeneratorFiles\content_packs\Base_Clothes.json [WinError 2] The system cannot find the file specified: 'F:\Blender3Data\HumanGeneratorFiles\content_packs\Base_Clothes.json' HG_WARNING: Could not remove F:\Blender3Data\HumanGeneratorFiles\content_packs\Base_Hair.json [WinError 2] The system cannot find the file specified: 'F:\Blender3Data\HumanGeneratorFiles\content_packs\Base_Hair.json' HG_WARNING: Could not remove F:\Blender3Data\HumanGeneratorFiles\content_packs\Base_Humans.json [WinError 2] The system cannot find the file specified: 'F:\Blender3Data\HumanGeneratorFiles\content_packs\Base_Humans.json' addon_utils.disable: HumGen3D not loaded addon_utils.disable: HumGen3D-4.beta.4 not disabled Modules Installed (HumGen3D-4.beta.4) from 'F:\Installers\HumanGenerator_Blender_Install_Files\HumGen3D-4.beta.4.zip' into 'C:\Users\Bruce A. Rady\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons' Traceback (most recent call last): File "H:\Program Files\Blender Foundation\3.4\scripts\modules\addon_utils.py", line 333, in enable mod = import(module_name) ModuleNotFoundError: No module named 'HumGen3D-4'

Info: Deleted 1 object(s)

Screenshots

Desktop (please complete the following information):

radman-x commented 1 year ago

BTW, HG v4 beta 1 does not have this error

OliverJPost commented 1 year ago

Did you download the source code directly or the release zip? I think this issue comes from Blender adapting the name of the folder that was zipped as the module name. When I zip the add-on I make sure the folder is named HumGen3D. It's possible that there is a trick in Python to rename the module, I will have a look at that.

radman-x commented 1 year ago

Downloaded from GitHub release tags - v4.beta.4. I see you have some newer betas, will try those on Monday.

radman-x commented 1 year ago

This is fixed with Blender 3.4 + HG v4.beta.6.