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

Can't decode str in python3 #9

Open
MartinSmeyer opened this issue Jun 24, 2021 · 1 comment
Open

Can't decode str in python3 #9

MartinSmeyer opened this issue Jun 24, 2021 · 1 comment

Comments

@MartinSmeyer
Copy link

Hey :)

I am encountering an error when loading meshes from the h5 files:

line 371, in load_mesh
    mesh_fname = data["object/file"][()].decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'

In Python3, strings are already unicode objects, so dropping .decode('utf-8') resolves the error for me.

@thomasweng15
Copy link

I also ran into this issue and it seemed to go away when I updated h5py to version 3.1.0.

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

2 participants