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

PyAssimp cannot load PLY #3887

Closed
Levi-Armstrong opened this issue May 5, 2021 · 2 comments · Fixed by #3940
Closed

PyAssimp cannot load PLY #3887

Levi-Armstrong opened this issue May 5, 2021 · 2 comments · Fixed by #3940
Labels
Bug Global flag to mark a deviation from expected behaviour pyassimp The Python Assimp port
Milestone

Comments

@Levi-Armstrong
Copy link

Describe the bug
This appears to be similar to this issue while loading ply. I have tried both ASCII and binary formats which produce the same error. I am currently using pyassimp version 4.1.4.

'Traceback (most recent call last):\n',
'  File "pyassimp/core.py", line 321, in load\n    scene = _init(model.contents)\n',
'  File "pyassimp/core.py", line 216, in _init\n    call_init(obj, target)\n', 
'  File "pyassimp/core.py", line 84, in call_init\n    _init(obj,parent=caller)\n', 
'  File "pyassimp/core.py", line 212, in _init\n    setattr(target, name, obj)\n', 
"AttributeError: 'bytes' object has no attribute 'aketrans'\n"
@Levi-Armstrong
Copy link
Author

Just tried version 4.1.3 and it works as expected.

kimkulling added a commit that referenced this issue Jun 3, 2021
@kimkulling
Copy link
Member

Hi,
thanks for your report. Indeed, there is an error in the iteration code for attributes of the loaded assimp structs. We have to check which kind of attribute we found and accidentally the wrong token was used to get the attributes. In the code, there was a check for the prefix m and for one case the starting m was used in the following code.

Instead of this token we need to use the original token.

I will try to fix the issue here: #3940

I will test the new stuff with the 5.01. If this fix works we need to update the pyassimp version.

@kimkulling kimkulling added Bug Global flag to mark a deviation from expected behaviour pyassimp The Python Assimp port labels Jun 3, 2021
@kimkulling kimkulling added this to ToDo in Planning for Release V5.1 via automation Jun 3, 2021
@kimkulling kimkulling added this to the Release 5.1 milestone Jun 3, 2021
Planning for Release V5.1 automation moved this from ToDo to Done Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Global flag to mark a deviation from expected behaviour pyassimp The Python Assimp port
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants