0

I'm getting this error :

 Traceback (most recent call last):
      File "C:\Program Files\Python39\sis-master\offline.py", line 15, in <module>
        np.save(feature_path, feature)
      File "<__array_function__ internals>", line 5, in save
      File "C:\Users\Admin\AppData\Roaming\Python\Python39\site-packages\numpy\lib\npyio.py", line 525, in save
        file_ctx = open(file, "wb")
        PermissionError: [Errno 13] Permission denied: 'static\\feature\\anh1.npy'

When running this:

 for img_path in sorted(Path("./static/img").glob("*.jpg")):
        print(img_path)  # e.g., ./static/img/xxx.jpg
        feature = fe.extract(img=Image.open(img_path))
        print(type(feature),feature.shape)
        feature_path = Path("./static/feature") / (img_path.stem + ".npy")  # e.g., ./static/feature/xxx.npy
        print(feature_path)
        np.save(feature_path, feature)
GoodDeeds
  • 7,956
  • 5
  • 34
  • 61

0 Answers0