-
Couldn't load subscription status.
- Fork 2.5k
Open
Labels
bugNot a build issue, this is likely a bug.Not a build issue, this is likely a bug.
Description
Checklist
- I have searched for similar issues.
- For Python issues, I have tested with the latest development wheel.
- I have checked the release documentation and the latest documentation (for
mainbranch).
Describe the issue
When attempting to load an ASCII .obj file using open3d.io.read_triangle_mesh() in a Windows environment, the function fails with a UTF-8 decoding error if the file path contains Korean (Hangul) characters. However, the same file saved as ASCII .ply loads successfully under identical conditions.
Steps to reproduce the bug
- Save an ASCII
.objfile with UTF-8 encoding. - Place the file in a directory with Korean characters in the path, e.g.,
C:/Users/사용자/샘플/sample.obj - Run the following code:
import open3d as o3d
mesh = o3d.io.read_triangle_mesh("C:/Users/사용자/샘플/sample.obj")- Observe the error:
'utf-8' codec can't decode byte 0xbb in position XX: invalid start byte
- Save the same mesh as
.plyin ASCII format and load it from the same path:
mesh = o3d.io.read_triangle_mesh("C:/Users/사용자/샘플/sample.ply")- This works without error.
Error message
'utf-8' codec can't decode byte 0xbb in position XX: invalid start byte
Expected behavior
Both .obj and .ply files should load successfully from paths containing non-ASCII characters, assuming the files themselves are properly encoded.
Actual Behavior
Only .ply files load successfully. .obj files fail with a UTF-8 decoding error.
Open3D, Python and System information
OS: Windows 10/11 (Korean locale)
Open3D version: 0.19.0
Python version: 3.10
File encoding: UTF-8 (confirmed)
File format: ASCII .obj and .plyAdditional information
- The
.objfile has been verified to be UTF-8 encoded. - The issue seems to be related to how Open3D parses
.objfiles internally, possibly involving texture or material references. - This issue does not occur when the path contains only ASCII characters.
Suggested Fix
- Ensure that Open3D’s
.objparser properly handles Unicode file paths and internal references. - Consider using wide-character APIs or Python’s
Pathobjects with proper encoding handling.
Metadata
Metadata
Assignees
Labels
bugNot a build issue, this is likely a bug.Not a build issue, this is likely a bug.