bingogome / samm

A 3D Slicer integration to Meta's SAM.
https://arxiv.org/abs/2304.05622
MIT License
241 stars 34 forks source link

OSError: [Errno 22] Invalid argument: 'C:\\Users\\38561\\samm\\samm-python-terminal\\samm-workspace\\mask.memmap' #34

Closed xiaoli26 closed 1 year ago

xiaoli26 commented 1 year ago

All images have been processed. ERROR:root:Traceback (most recent call last): File "C:\Users\38561\samm\samm-python-terminal\sam_server.py", line 272, in main srv.infer_image( \ File "C:\Users\38561\samm\samm-python-terminal\sam_server.py", line 188, in infer_image memmap = np.memmap(os.path.join(self.workspace, "mask.memmap"), dtype='bool', mode='w+', shape=self.masks[0].shape) File "C:\Users\38561\AppData\Roaming\Python\Python39\site-packages\numpy\core\memmap.py", line 228, in new f_ctx = open(os_fspath(filename), ('r' if mode == 'c' else mode)+'b') OSError: [Errno 22] Invalid argument: 'C:\Users\38561\samm\samm-python-terminal\samm-workspace\mask.memmap'

Everthing went well except the error message.

bingogome commented 1 year ago

The error looks like something file lock related. The data transmission will need to be optimized using #10 . Currently, it will still work even with the error. I am going to write an ignore condition.

xiaoli26 commented 1 year ago

Thanks for your reply and your excellent work!