TypeError: array() takes 1 positional argument but 2 were given
when trying to use the classify method I get this error
**The code snippet which gave this error***
clf.classify('/home/shrbo/Downloads/dtest.jpeg')
libraries versions
nudenet==2.0.9
numpy==1.21.0
Expected behavior
The nsfw score
Output
ERROR:root:Error reading /home/shrbo/Downloads/dtest.jpeg array() takes 1 positional argument but 2 were given
Traceback (most recent call last):
File "/home/shrbo/venvpy/nudetest/lib/python3.7/site-packages/nudenet/image_utils.py", line 134, in load_images
image = img_to_array(image)
File "/home/shrbo/venvpy/nudetest/lib/python3.7/site-packages/nudenet/image_utils.py", line 102, in img_to_array
x = np.asarray(img, dtype=dtype)
TypeError: array() takes 1 positional argument but 2 were given
Out[3]: {}
This Solution only worked on older version that I've installed, doesn't work on newly created ones
uninstalling nudenet==2.0.9
Installing nudenet==2.0.8
The numpy version after installing 2.0.8 is numpy==1.20.3
The problem solved
TypeError: array() takes 1 positional argument but 2 were given when trying to use the classify method I get this error
**The code snippet which gave this error***
libraries versions
Expected behavior The nsfw score
Output ERROR:root:Error reading /home/shrbo/Downloads/dtest.jpeg array() takes 1 positional argument but 2 were given Traceback (most recent call last): File "/home/shrbo/venvpy/nudetest/lib/python3.7/site-packages/nudenet/image_utils.py", line 134, in load_images image = img_to_array(image) File "/home/shrbo/venvpy/nudetest/lib/python3.7/site-packages/nudenet/image_utils.py", line 102, in img_to_array x = np.asarray(img, dtype=dtype) TypeError: array() takes 1 positional argument but 2 were given Out[3]: {}
This Solution only worked on older version that I've installed, doesn't work on newly created ones uninstalling nudenet==2.0.9 Installing nudenet==2.0.8 The numpy version after installing 2.0.8 is numpy==1.20.3 The problem solved