Failed to run Bent_Patch_Antenna.py

Install support for openEMS

Moderators: thorsten, sebastian

Post Reply
GeraldCarda
Posts: 8
Joined: Wed 19 Feb 2020, 17:47

Failed to run Bent_Patch_Antenna.py

Post by GeraldCarda » Fri 21 Feb 2020, 13:42

While testing the python interface I run into an issue with the 'Bent_Patch_Antenna.py' example (actually the first one I tested).

I did a 'Linux from source' installation. The (local to the user) install path I used is:

~/opt/openEMS

I run the python setup scripts for openEMS and CSXCAD:

python setup.py build_ext -I/home/ubuntu/opt/openEMS/include -L/home/ubuntu/opt/openEMS/lib -R/home/ubuntu/opt/openEMS/lib
python setup.py install --user

I did both of the above for python version 2.7.17 and 3.6.9 (ubuntu 18.04 LTS defaults)

The 'Bent_Patch_Antenna.py' example failed with:

Traceback (most recent call last):
File "Bent_Patch_Antenna.py", line 81, in <module>
CSX.AddBox(patch, priority=10, start=start, stop=stop, edges2grid='all') # add a box-primitive to the metal property 'patch'
AttributeError: 'CSXCAD.CSXCAD.ContinuousStructure' object has no attribute 'AddBox'

Running 'test_CSXCAD.py' (both Python 2+3):

0
1
1
all ok

Running 'test_CSPrimitives.py' (Python 3):

..............
----------------------------------------------------------------------
Ran 14 tests in 0.004s

OK

Running 'test_CSPrimitives.py' (Python 2):

........F.....
======================================================================
FAIL: test_polyhedron (__main__.Test_CSPrimMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_CSPrimitives.py", line 290, in test_polyhedron
self.assertTrue (ph.IsInside([x0+width/4, y0+width/4, z0+height/2]))
AssertionError: False is not true

----------------------------------------------------------------------
Ran 14 tests in 0.035s

FAILED (failures=1)

I would focus on Python3, so the failing test for Python2 may not important for my setup. But the example still fails for both Python versions.

Any ideas how I can proceed?

Best regards,

Gerald

Post Reply