pytest fail

14 views
Skip to first unread message

V K

unread,
Jun 21, 2024, 5:32:10 PM6/21/24
to NURBS-Python
Hello,

I am using Ubuntu 22.04 and I chose the conda package manager for installation. However, when I tried pytest in the *seemingly* appropriate directory, the test appears to fail (see below). While the basic examples appear to still work, if I try more advanced examples, then the same error message appears. 

I have not spent time digging into the root cause and how to get past it but I assumed others might have run into a similar issue and guide me and save myself some time. 

Thanks,

--v k


============================= test session starts ==============================
platform linux -- Python 3.12.2, pytest-8.2.2, pluggy-1.5.0
rootdir: .. /miniconda3/pkgs/geomdl-5.3.1-py_0/info/test/tests
collected 222 items / 1 error                                                  

==================================== ERRORS ====================================
____________________ ERROR collecting test_visualization.py ____________________
test_visualization.py:17: in <module>
    from geomdl.visualization import VisMPL
../../../../../lib/python3.12/site-packages/geomdl/visualization/VisMPL.py:124: in <module>
    class VisCurve2D(vis.VisAbstract):
../../../../../lib/python3.12/site-packages/geomdl/visualization/VisMPL.py:126: in VisCurve2D
    def __init__(self, config=VisConfig(), **kwargs):
../../../../../lib/python3.12/site-packages/geomdl/visualization/VisMPL.py:71: in __init__
    self.dtype = np.float
../../../../../lib/python3.12/site-packages/numpy/__init__.py:324: in __getattr__
    raise AttributeError(__former_attrs__[attr])
E   AttributeError: module 'numpy' has no attribute 'float'.
E   `np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
E   The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
E       https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'?
=========================== short test summary info ============================
ERROR test_visualization.py - AttributeError: module 'numpy' has no attribute 'float'.
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.60s ===============================

Onur R. Bingol

unread,
Jun 21, 2024, 6:12:13 PM6/21/24
to nurbs-python
Please test with "feature/vis-fix" branch: https://github.com/orbingol/NURBS-Python/tree/feature/vis-fix



---- On Fri, 21 Jun 2024 14:32:09 -0700 V K <vika...@gmail.com> wrote ---

--
You received this message because you are subscribed to the Google Groups "NURBS-Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nurbs-python...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nurbs-python/a6de6a1b-6810-49b0-aaad-a1d7b46f12f2n%40googlegroups.com.


V K

unread,
Jun 21, 2024, 10:40:04 PM6/21/24
to NURBS-Python
I will give that a shot, thank you. Meanwhile, installing on RHEL 8 using pip3 worked like a charm.

I am curious about the valve geometry shown here: https://nurbs-python.readthedocs.io/en/5.x/module_container.html Is the source code available to share for this example?

Thanks!

Onur R. Bingol

unread,
Jun 21, 2024, 10:47:32 PM6/21/24
to nurbs-...@googlegroups.com
Unfortunately, the hearth valve geometry data is not available to share. It was created as a demo for one of our papers published a while ago, I don't think I even have the geometry data myself at this time :)




---- On Fri, 21 Jun 2024 19:40:04 -0700 vika...@gmail.com wrote ----

Reply all
Reply to author
Forward
0 new messages