Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Can\'t mix strings and bytes in path components\n') #9

Open
taylorlulu opened this issue Mar 4, 2024 · 0 comments
Open

Comments

@taylorlulu
Copy link

I encountered some error when I'm trying to run the run_train_gibson.sh.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/lu/anaconda3/envs/HRL4In/lib/python3.7/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/home/lu/anaconda3/envs/HRL4In/lib/python3.7/genericpath.py", line 155, in _check_arg_types
    raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components

I found that it was caused by the HRL4IN/iGibson/gibson2/core/render/mesh_renderer/mesh_renderer_cpu.py file in line 393-394.

dir = os.path.dirname(obj_path)
texture = loadTexture(os.path.join(dir, v), scale=texture_scale)

I found that the type of dir is string, while the type of v is bytes. And the command os.path.join(dir, v) caused the error.

The value of dir is "anaconda3/envs/HRL4In/lib/python3.7/site-packages/pybullet_data/roboschool/models_outdoor/stadium". I guessed it was a problem caused by the version of pybullet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant