Issue with Python Script - Node

Hi Community,

I have been using the “Python Script” - Node in KNIME to score some of my models. For some weeks now though it is not working anymore and I get an error message (see below). I am not using “numpy” or “str” in an explicit way. The only packages Im using are pandas, pickle and datetime.

I would be very happy if somebody could help me out with this.

Thanks in advance!

ERROR Python Script 3:1 Execute failed: module ‘numpy’ has no attribute ‘str’.
np.str was a deprecated alias for the builtin str. To avoid this error in existing code, use str by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.str_ here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
NumPy 1.20.0 Release Notes — NumPy v2.1.dev0 Manual

pandas is based on numpy so this could be the reason. Maybe try upgrading your packages
br

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.