Error when use vision.uncompress_image(...)
Error report :
ValueError Traceback (most recent call last)
File c:...\td_visionned2-recupimglocal_etud.py:28
25 img_uncompressed = fi.read()
26 fi.close()
---> 28 img = vision.uncompress_image(img_uncompressed)
29 vision.show_img("img_tes", img)
File ~\AppData\Roaming\Python\Python311\site-packages\pyniryo\vision\image_functions.py:388, in uncompress_image(compressed_image)
379 def uncompress_image(compressed_image):
380 """
381 Take a compressed img and return an OpenCV image
382
(...)
386 :rtype: numpy.array
387 """
--> 388 np_arr = np.fromstring(compressed_image, np.uint8)
389 return cv2.imdecode(np_arr, cv2.IMREAD_COLOR)
ValueError: The binary mode of fromstring is removed, use frombuffer instead
You have to replace in "pyniryo\vision\image_functions.py" line 388
388: np_arr = np.fromstring(compressed_image, np.uint8)
by
388: np_arr = np.frombuffer(compressed_image, np.uint8)
Error when use vision.uncompress_image(...)
Error report :
You have to replace in "pyniryo\vision\image_functions.py" line 388
by