Python Error when disk volume name contains Non-Standard characters #111379

Open
opened 2023-08-22 13:50:28 +02:00 by Feng · 2 comments

System Information
Operating system:Windows11 22621.2134
Graphics card:NVIDIA GTX 1050Ti

Blender Version
Broken: all
Worked: none

Short description of error
When you use some special unicode for file names.
It will log error if you open the blender file manager.

Maybe we should have some way to ignore the special unicode?
Somebody likes use emoji as file name likes me...

image

  File "G:\blender\36\3.6\scripts\startup\bl_ui\space_filebrowser.py", line 220, in draw_item
    row.label(text=direntry.name, icon_value=icon)
TypeError: UILayout.label(): error with keyword argument "text" -  Function.text error assigning string, UnicodeEncodeError('utf-8' codec can't encode character '\ud83d' in position 0: surrogates not allowed)
Traceback (most recent call last):
  File "G:\blender\36\3.6\scripts\startup\bl_ui\space_filebrowser.py", line 220, in draw_item
    row.label(text=direntry.name, icon_value=icon)
TypeError: UILayout.label(): error with keyword argument "text" -  Function.text error assigning string, UnicodeEncodeError('utf-8' codec can't encode character '\ud83d' in position 0: surrogates not allowed)
Traceback (most recent call last):
  File "G:\blender\36\3.6\scripts\startup\bl_ui\space_filebrowser.py", line 220, in draw_item
    row.label(text=direntry.name, icon_value=icon)
TypeError: UILayout.label(): error with keyword argument "text" -  Function.text error assigning string, UnicodeEncodeError('utf-8' codec can't encode character '\ud83d' in position 0: surrogates not allowed)

Windows explore:
image

Exact steps for others to reproduce the error

  • ...
**System Information** Operating system:Windows11 22621.2134 Graphics card:NVIDIA GTX 1050Ti **Blender Version** Broken: all Worked: none **Short description of error** When you use some special unicode for file names. It will log error if you open the blender file manager. Maybe we should have some way to ignore the special unicode? Somebody likes use emoji as file name likes me... ![image](/attachments/ac62d5f5-cbf8-4b59-880d-89893b3494ee) ``` File "G:\blender\36\3.6\scripts\startup\bl_ui\space_filebrowser.py", line 220, in draw_item row.label(text=direntry.name, icon_value=icon) TypeError: UILayout.label(): error with keyword argument "text" - Function.text error assigning string, UnicodeEncodeError('utf-8' codec can't encode character '\ud83d' in position 0: surrogates not allowed) Traceback (most recent call last): File "G:\blender\36\3.6\scripts\startup\bl_ui\space_filebrowser.py", line 220, in draw_item row.label(text=direntry.name, icon_value=icon) TypeError: UILayout.label(): error with keyword argument "text" - Function.text error assigning string, UnicodeEncodeError('utf-8' codec can't encode character '\ud83d' in position 0: surrogates not allowed) Traceback (most recent call last): File "G:\blender\36\3.6\scripts\startup\bl_ui\space_filebrowser.py", line 220, in draw_item row.label(text=direntry.name, icon_value=icon) TypeError: UILayout.label(): error with keyword argument "text" - Function.text error assigning string, UnicodeEncodeError('utf-8' codec can't encode character '\ud83d' in position 0: surrogates not allowed) ``` Windows explore: ![image](/attachments/2b834a7c-deab-4718-ba60-88a1596b4bc8) **Exact steps for others to reproduce the error** - ...
107 KiB
6.0 KiB
Feng added the
Type
Report
Priority
Normal
Status
Needs Triage
labels 2023-08-22 13:50:29 +02:00
Germano Cavalcante changed title from It error of file manager if not use normal Unicode for file names to Python Error when disk volume name contains Non-Standard characters 2023-08-23 04:26:50 +02:00

Thanks for the report, @system-system.

To better understand the issue, could you please provide the exact steps you took to encounter this error? Additionally, could you confirm if the error only occurs when using file names with special unicode characters?

I will forward this bug report to the Blender development team for further investigation. They will review the issue and determine the best course of action to address it.

Thanks for the report, @system-system. To better understand the issue, could you please provide the exact steps you took to encounter this error? Additionally, could you confirm if the error only occurs when using file names with special unicode characters? I will forward this bug report to the Blender development team for further investigation. They will review the issue and determine the best course of action to address it.
Germano Cavalcante added
Module
User Interface
Status
Confirmed
Platform
Windows
and removed
Status
Needs Triage
labels 2023-08-23 04:31:17 +02:00
Author

Thanks for the report, @system-system.

To better understand the issue, could you please provide the exact steps you took to encounter this error? Additionally, could you confirm if the error only occurs when using file names with special unicode characters?

I will forward this bug report to the Blender development team for further investigation. They will review the issue and determine the best course of action to address it.

The steps are very simple. Set the file name to uncommon Unicode characters. Then look at this folder in the Blender file manager. You will get the error.

It only errors if use uncommon Unicode characters. For example:\ud83b \ud83c \ud83d

> Thanks for the report, @system-system. > > To better understand the issue, could you please provide the exact steps you took to encounter this error? Additionally, could you confirm if the error only occurs when using file names with special unicode characters? > > I will forward this bug report to the Blender development team for further investigation. They will review the issue and determine the best course of action to address it. > > > The steps are very simple. Set the file name to uncommon Unicode characters. Then look at this folder in the Blender file manager. You will get the error. It only errors if use uncommon Unicode characters. For example:`\ud83b` ` \ud83c` ` \ud83d`
Campbell Barton self-assigned this 2023-08-23 11:51:09 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#111379
No description provided.