Unicode Error When Linking Materials from External .blend File

edited February 21 in General

This may not be intuitive for users in the alphabet world, but let me explain the situation I encountered. I'll do my best!

I get an Unicode-related error when I try to link an external material from another .blend file.

This occurs when I use Japanese characters for the material name stored in the external file. In fact, when I use alphabets, it works perfectly. If this is a bug, it is most likely to occur CJK languages in general.

Error Message from System Console

Traceback (most recent call last):
File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\style\operator.py", line 288, in execute
    if self.data_block == "":
File "C:\Users\XXX\Documents\YA\BLENDER\BlenderLauncher\stable\blender-3.6.8+stable.f6ae60f3eeda\3.6\scripts\modules\bpy_types.py", line 857, in __getattribute__
    return getattr(properties, attr)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 0: invalid start byte

How to Reproduce

  1. Create a ifc project from Demo Library.
  2. Create a wall with WAL100 from the default wall type.
  3. Assign a material and style to it.
  4. Go to "Geometry and Materials > Styles" and select the corresponding style.
  5. Click "Edit Style"
  6. Click "External"
  7. Click "Append From Blend File"

  8. Select the material from the external .blend file.

  9. The name of the material is not displayed correctly.

  10. Anyway, select the material, and continue to click "Browse External Style".

  11. System Console produces the error message.

Please take a look at the attached files

  • test.blend
  • test.ifc
  • external_materials.blend

Other Remarks

To make sure the default blender feature is working correctly, I did the following:

  1. Go to File > Append
  2. Select the .blend file that stores external materials.
  3. The name is displayed correctly.

My System Environment

OS: Windows 10 (displayed language = Japanese)
Blender: 3.6.8 (When linking the external material)*
BlenderBIM: v0.0.240220

* Blender 4.0.x does not refresh external materials, so I used 3.6.8.
* Related: https://community.osarch.org/discussion/comment/18166/#Comment_18166

NigelatomkarincaAce
Sign In or Register to comment.