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

Bug found in "pyntcloud.io.read_obj()" function #230

Closed
weders opened this issue Dec 10, 2018 · 3 comments
Closed

Bug found in "pyntcloud.io.read_obj()" function #230

weders opened this issue Dec 10, 2018 · 3 comments
Assignees
Labels

Comments

@weders
Copy link

weders commented Dec 10, 2018

Description

If one tries to load an .obj file using the library, the following error occurs:

TypeError: Could not operate 1 with block values unsupported operand type(s) for -: 'str' and 'int'

This happens because the code does not correctly handle missing texture vertex coordinates in the .obj file. If there are no texture vertex coordinates, None is written to the pd.DataFrame and you cannot subtract 1 from NoneType while correcting the indices.

@daavoo daavoo added the Bug label Jan 12, 2019
@daavoo daavoo self-assigned this Jan 12, 2019
@daavoo
Copy link
Owner

daavoo commented Jan 13, 2019

Hola @weders thanks for the report. Could you share an example .obj file that causes this error?

@thomas-frieling
Copy link

The error can be reproduced with a simple cube example from https://de.wikipedia.org/wiki/Wavefront_OBJ

File attached: cube.obj.zip

@daavoo
Copy link
Owner

daavoo commented Aug 26, 2019

Fixed un #253

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

No branches or pull requests

3 participants