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

Python3.7 upgrading and TypeError: TypeError: can't multiply sequence by non-int of type 'float' #191

Open
felipe-dap opened this issue Feb 19, 2021 · 0 comments

Comments

@felipe-dap
Copy link

felipe-dap commented Feb 19, 2021

Cheers everyone and thanks for the effort on making this available for everyone.
Since I needed to run it on Python 3.7 I had to adjust a few things.

  1. Adjusting relative imports,

  2. Class Node from gtfl2
    Line 11 -> unicode has to be changed to str for Python 3.

  3. Class Skin from gtfl2
    Remove import Set from sets, as it is built-in for Python 3.
    change Set to set on the file, whenever it has called. If I remember it correctly, it was called just once.

  4. gltf2usd.py
    On line 396 I had to force indices length/3 to return an integer as follows.
    num_faces = int(len(indices)/3)

Otherwise I ran into this:
Traceback (most recent call last):
File "gltf2usd.py", line 924, in
- irrelevant part -
face_count = [3] * num_faces
TypeError: can't multiply sequence by non-int of type 'float'

With this simple changes I could manage to make it work effortless.
Leaving this remarks in case someone needs it. =)
Mantainers can close this issue. This is just in case someone runs into this as well and need some guidance.
Thanks once again for the amazing work here.

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