Read-only CPM folder preventing me from running Colab example - Read-only file system: './result.png'
vietanhdev opened this issue · comments
Viet-Anh NGUYEN (Andrew) commented
Hello,
As in your Colab instruction, I added a shortcut of CPM-Shared-Folder to my Drive. However, I don't have the permission to write to your Drive, so I see the following error when running your instruction:
Traceback (most recent call last):
File "main.py", line 54, in <module>
Image.fromarray((output).astype("uint8")).save(save_path)
File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 2131, in save
fp = builtins.open(filename, "w+b")
OSError: [Errno 30] Read-only file system: './result.png'
Suggested solutions: Point savedir
to another directory:
# Pattern + Color: Image will be saved in 'result.png'
os.chdir(path)
!python -W ignore main.py --style ./imgs/style-1.png --input ./imgs/non-makeup.png --savedir=/content/
You should also update other commands.
Viet-Anh NGUYEN (Andrew) commented
My modified version: https://colab.research.google.com/drive/1abjUknTiVAOgxmKSctItZcxkwQWV5KtD.
Thao Nguyen commented
Thank you for pointing out the issue.