Skip to content

MuJoCo files in a directory containing UTF-8 fail to load (Windows only) #3139

@ft-lab

Description

@ft-lab

Intro

Hi!

I am developing a converter at NVIDIA that converts MuJoCo's XML files to OpenUSD format.

My setup

  • MuJoCo 3.5.0
  • Python 3.11.13
  • Windows 11

What's happening? What did you expect?

Cannot open XML files with UTF-8 characters in their directory names using "bin/simulate.exe".
I am getting the error "ParseXML: Error opening file".

I have confirmed that this also fails with the following mujoco.MjSpec.from_file in Python.

spec = mujoco.MjSpec.from_file(path.as_posix())

Note: This only occurs in Windows environments. I have confirmed that it does not occur on Linux (Ubuntu 22.04).

Steps for reproduction

  1. Create a directory named "C:/temp/UTF-8のディレクトリ".
    Please create directory names using multibyte character sets such as Japanese or Chinese.
  2. Copy the "model/cube" directory from the MuJoCo repository to this directory.
    The directory structure will be as follows.
  C:
    [temp]
      [UTF-8のディレクトリ]
        [cube]
          [assets]
            blue.png
            ...
          cube_3x3x3.xml
          README.md
  1. Launch MuJoCo's "bin/simulate.exe" and drag and drop the xml file from this directory.
  2. The following error is displayed, and loading fails.
ParseXML: Error opening file 'C:\temp\UTF-8のディレクトリ\cube\cube_3x3x3.xml'

Minimal model for reproduction

No response

Code required for reproduction

No response

Confirmations

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions