hrcorval / behavex

BDD testing solution designed to enhance your Behave-based testing workflows
https://github.com/hrcorval/behavex
MIT License
89 stars 20 forks source link

[Help] While using behavex images getting error #180

Open vibincwilson opened 1 week ago

vibincwilson commented 1 week ago

ERROR:root:[behavex-images] The provided binary is not a valid image, or could not be converted to PNG: module 'numpy' has no attribute 'float'. 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. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

I have library numpy 2.1.3

prasanmgc commented 2 days ago

@vibincwilson Until the new version 4.0.9 which should ideally have numpy updated. use the below to proceed further.

Add np.float = float above the below line in your environment.py.

image_attachments.set_attachments_condition(context, AttachmentsCondition.ALWAYS)

Hope this helps :)