BlenderTools: UE to Rigify: (Blender 3.0 beta) UE to Rigify error prevents load

  • Addon: UE to Rigify
  • Steps to Reproduce the Problem: Start Blender 3.0, download UE to Rigify, load and hit enable
  • Error Log:
Traceback (most recent call last):
  File "D:\Blender\build_windows_x64_vc16_Release\bin\Release\3.0\scripts\modules\addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "C:\Users\Dan\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\ue2rigify\__init__.py", line 6, in <module>
    from . import properties, operators
  File "C:\Users\Dan\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\ue2rigify\properties.py", line 10, in <module>
    class UE2RigifyProperties(bpy.types.PropertyGroup):
  File "C:\Users\Dan\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\ue2rigify\properties.py", line 19, in UE2RigifyProperties
    rig_templates_path = templates.get_rig_templates_path()
  File "C:\Users\Dan\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\ue2rigify\functions\templates.py", line 27, in get_rig_templates_path
    addons = bpy.utils.user_resource('SCRIPTS', 'addons')
TypeError: user_resource() takes 1 positional argument but 2 were given
  • **OS:**Windows
  • Addon Version: 1.5.8
  • Blender Version: 3.0
  • Unreal Version: N/A

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (10 by maintainers)

Commits related to this issue

Most upvoted comments

I fixed this with the following steps:

  1. Unzip the addon file
  2. Edit: \ue2rigify\functions\templates.py
  3. Change line 27 to the following: addons = bpy.utils.user_resource('SCRIPTS',path='addons')
  4. Save the file, then zip the folder again.
  5. Make sure the current addon is removed
  6. Close and open again blender
  7. Install the add-on from the newly created zip file.

The root of the issue is that the API changed in blender 3.0 and now the second and third arguments are named, so it’s required to add the ‘path=’ part to the function call.

@DanMcLaughlin ok thanks for reporting! Ill probably swap this to just use tempfile instead so that the templates persist outside the addon in the next release.

Care to make a patch and submit it so we can close this issue?

Okay, I got the solution and the one which worked is the earlier one which you mentioned. Anyways thank you so much for the assistance.

add “path=” on line 27 of templates.py https://www.twitch.tv/videos/1195837095

yea try replacing this line https://github.com/EpicGames/BlenderTools/blob/144a441743739c0f9cf0d8ed84e1e1b538173e81/ue2rigify/addon/functions/templates.py#L27

with addons = tempfile.gettempdir()

also add import tempfile to the top of the file

I think that shoud fix it