Skip to content

Crash on import: ValueError: setting an array element with a sequence. #6

Open
@FranseFrikandel

Description

@FranseFrikandel

Hello there!

When trying to import pyccx, the statement 'import pyccx' causes a crash. This is done similarly as the example python file.

Simply commenting out the WEDGE6 class in mesher.py appears to fix it for now for me, but this class is presumably needed somewhere and should probably be fixed.

Traceback (most recent call last):
  File "/mnt/c/Users/CRGam/Documents/tandwielen/calculate.py", line 1, in <module>
    import pyccx
  File "/mnt/c/Users/CRGam/Documents/tandwielen/pyccx/pyccx/__init__.py", line 2, in <module>
    from . import mesh
  File "/mnt/c/Users/CRGam/Documents/tandwielen/pyccx/pyccx/mesh/__init__.py", line 1, in <module>
    from .mesher import ElementType, Mesher, MeshingAlgorithm
  File "/mnt/c/Users/CRGam/Documents/tandwielen/pyccx/pyccx/mesh/mesher.py", line 19, in <module>
    class ElementType:
  File "/mnt/c/Users/CRGam/Documents/tandwielen/pyccx/pyccx/mesh/mesher.py", line 79, in ElementType
    class WEDGE6:
  File "/mnt/c/Users/CRGam/Documents/tandwielen/pyccx/pyccx/mesh/mesher.py", line 84, in WEDGE6
    faces = np.array([[1,2,3], [4,5,6], [1,2,5,4], [2,3,6,5], [3,1,4,6]])
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (5,) + inhomogeneous part.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions