TypeError: imsave() missing 1 required positional argument: 'arr' in run_Cellpose-SAM.ipynb
Describe the bug
I'm running the run_Cellpose-SAM.ipynb file in colab with gpu, but got the TypeError: imsave() missing 1 required positional argument: 'arr' . To resolve this issue, I double checked the io.imsave() and io.save_rois() API guide. I found these two functions do not return anything, so you cannot assign the output to a variable. The code line masks0 = io.imsave(dir / (f.name + "_masks" + masks_ext)) should be corrected to be io.imsave(dir / (f.name + "_masks" + masks_ext)), and then it works fine. I'd like to submit a PR if this raised issue and fix looks good to you
To Reproduce Steps to reproduce the behavior:
- Go to run_Cellpose-SAM.ipynb
- run run_Cellpose-SAM.ipynb
- Scroll down to final bottom code block
- See error : TypeError: imsave() missing 1 required positional argument: 'arr'
Run log Error message:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-14-330c8aba240f>](https://localhost:8080/#) in <cell line: 0>()
1 for i in trange(len(files)):
2 f = files[i]
----> 3 masks0 = io.imsave(dir / (f.name + "_masks" + masks_ext))
4 io.save_rois(masks0, f)
TypeError: imsave() missing 1 required positional argument: 'arr'
Code block:
for i in trange(len(files)):
f = files[i]
masks0 = io.imsave(dir / (f.name + "_masks" + masks_ext))
io.save_rois(masks0, f)
Screenshots
Hi @Jiadalee please make a PR for this
Hi @Jiadalee please make a PR for this
@mrariden PR was created and feel free to review: https://github.com/MouseLand/cellpose/pull/1211