HRL4IN
HRL4IN copied to clipboard
TypeError: Can\'t mix strings and bytes in path components\n')
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.