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

<type 'exceptions.ValueError'> on a collada file #84

Closed
sylvestre opened this issue Jul 1, 2018 · 2 comments
Closed

<type 'exceptions.ValueError'> on a collada file #84

sylvestre opened this issue Jul 1, 2018 · 2 comments
Labels

Comments

@sylvestre
Copy link

Trying to load in freecad the following file: https://3dwarehouse.sketchup.com/model/06313964-7555-4f9a-8097-bb1dbc459d35/GARBAGE-BIN-SHED

Fails with

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/freecad/Mod/Arch/importDAE.py", line 78, in open
    read(filename)
  File "/usr/lib/freecad/Mod/Arch/importDAE.py", line 111, in read
    for geom in col.scene.objects('geometry'):
  File "/usr/lib/python2.7/dist-packages/collada/scene.py", line 897, in objects
    for obj in node.objects(tipo, matrix): yield obj
  File "/usr/lib/python2.7/dist-packages/collada/scene.py", line 374, in objects
    for obj in node.objects(tipo, M):
  File "/usr/lib/python2.7/dist-packages/collada/scene.py", line 371, in objects
    if not matrix is None: M = numpy.dot( matrix, self.matrix )
<type 'exceptions.ValueError'>: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

model.dae.gz

@sylvestre
Copy link
Author

Importing the file with SketchUp, this tool detected an issue in the file, proposed to fix it. The file can be imported later in pycollada.

@jterrace jterrace added the bug label Jan 23, 2020
@jterrace
Copy link
Member

I can't reproduce this:

>>> c = collada.Collada("/Users/jterrace/Downloads/Rib Test.dae")
>>> list(c.scene.objects('geometry'))
[<BoundGeometry id=ID3, 1 primitives>]

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

2 participants