Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOError while writing to file. You might have run out of disk space, or file might be too large for your OS #155

Closed
HarrisonOates opened this issue Jun 16, 2020 · 17 comments

Comments

@HarrisonOates
Copy link

I've run the script through once, and it worked alright, however it did not download all of the photos. I am getting the error
OError while writing file to #### You might have run out of disk space, or the file might be too large for your OS. Skipping this file...
I'm on an Arch Linux machine.

@nihelmasell
Copy link

I have the same issue.

@Monsterbacke007
Copy link

I have the same issue: OS Win10 Pro trying to download onto a network drive (NAS).

@AndreyNikiforov
Copy link
Collaborator

@LoonyGryphon @Monsterbacke007 assuming that disk has enough space for the file (and destination system supports large files), do you mind trying the process again? Since it was skipped during the error, next run will try to download it again and we'll see if the problem is specific to the file or intermittent.

@nihelmasell
Copy link

I used this solution #150 (comment) because I also had the issue mentioned in that thread. After doing that, I didn't have this problem again (it "magically" solved two issues at once).

@Monsterbacke007
Copy link

Monsterbacke007 commented Oct 5, 2020

@AndreyNikiforov the issue persists (differnt computer, different location, same OS) with different files now.

@nihelmasell I am getting a syntax error or "continue not properly in loop" trying this on Win10 Pro: As I am new to Python can someone please help?

@nihelmasell
Copy link

nihelmasell commented Oct 6, 2020

@nihelmasell I am getting a syntax error or "continue not properly in loop" trying this on Win10 Pro: As I am new to Python can someone please help?

I'm also new to Python. I'm running the script on an Ubuntu 20 Linux install and have no issue right now (modifying the lines like the mentioned post says).

@Monsterbacke007
Copy link

Is there a way to retry aborted or skipped files with filename? Havent found it in the doc.

@menkej
Copy link
Collaborator

menkej commented Oct 6, 2020

Guys, are you sure you're running the latest version of pyicloud-ipd? Please check:

$ pip3 list | grep pyicloud-ipd
pyicloud-ipd 0.10.1

If you are running an older version, please install the latest version of icloud_photos_downloader and the requirements.

$ pip3 install -r requirements.txt

It should not be necessary to edit files any more as the fix for the other bug is included now.

Is the issue still occurring?

@menkej
Copy link
Collaborator

menkej commented Oct 6, 2020

Is there a way to retry aborted or skipped files with filename? Havent found it in the doc.

What do you mean? An selective download of a specific file? If you want to retry for whatever reason you could just rerun the script. Existing files are skipped quite quickly.

@Monsterbacke007
Copy link

Is there a way to retry aborted or skipped files with filename? Havent found it in the doc.

What do you mean? An selective download of a specific file? If you want to retry for whatever reason you could just rerun the script. Existing files are skipped quite quickly.

All good. It seems the files were all downloaded despite the error. The only explanation I can imagine is that files were downloaded twice in a short amount of time so whilst file abc was written the system tried to write another instance of the exact same file and hence skipped it. Thx for all your feedbacks.

@konradorlinski
Copy link

I had same issue on Debian 10. My solution is to create new directory and set chown for user which runs icloudpd.
Long story short: icloudpd script don't have permissions to save in directory

@boredazfcuk
Copy link
Contributor

boredazfcuk commented Oct 18, 2020

I've seen this issue tonight as well. A snippet from one of my logs:

2020-10-18 21:11:23 INFO     Downloading /home/user/iCloud/2020/98c430b4-11c0-4c31-915d-2fb82d459e0f.mp4
2020-10-18 21:11:25 INFO     Downloading /home/user/iCloud/2020/IMG_1294.PNG
2020-10-18 21:11:25 INFO     Downloading /home/user/iCloud/2020/IMG_1294.PNG
2020-10-18 21:11:26 INFO     Downloading /home/user/iCloud/2020/6bbdd713860347b46f5af9f424b4f5b8.jpg
2020-10-18 21:11:26 INFO     Downloading /home/user/iCloud/2020/IMG_1291.HEIC
2020-10-18 21:11:26 ERROR    IOError while writing file to /home/user/iCloud/2020/IMG_1294.PNG! You might have run out of disk space, or the file might be too large for your OS. Skipping this file...
2020-10-18 21:11:26 INFO     Downloading /home/user/iCloud/2020/IMG_1290.HEIC
2020-10-18 21:11:27 INFO     Downloading /home/user/iCloud/2020/IMG_1289.HEIC
...
2020-10-18 21:16:04 INFO     Downloading /home/user/iCloud/2020/IMG_0883.HEIC
2020-10-18 21:16:05 INFO     Downloading /home/user/iCloud/2020/IMG_0878.HEIC
2020-10-18 21:16:05 INFO     /home/user/iCloud/2020/camphoto_1804928587-3140301.jpg deduplicated.
2020-10-18 21:16:05 INFO     Downloading /home/user/iCloud/2020/camphoto_1804928587-3140301.jpg
2020-10-18 21:16:21 INFO     Downloading /home/user/iCloud/2020/IMG_0825.HEIC
2020-10-18 21:16:21 INFO     Downloading /home/user/iCloud/2020/IMG_0792.JPG
2020-10-18 21:16:22 INFO     Downloading /home/user/iCloud/2020/IMG_0791.HEIC
2020-10-18 21:16:22 INFO     Downloading /home/user/iCloud/2020/IMG_0790.HEIC
2020-10-18 21:16:23 ERROR    IOError while writing file to /home/user/iCloud/2020/camphoto_1804928587.jpg! You might have run out of disk space, or the file might be too large for your OS. Skipping this file...
2020-10-18 21:16:23 INFO     /home/user/iCloud/2020/camphoto_1804928587-3710764.jpg deduplicated.
2020-10-18 21:16:23 INFO     Downloading /home/user/iCloud/2020/camphoto_1804928587-3710764.jpg
2020-10-18 21:16:23 INFO     /home/user/iCloud/2020/camphoto_1804928587-3561146.jpg deduplicated.
2020-10-18 21:16:23 INFO     Downloading /home/user/iCloud/2020/camphoto_1804928587-3561146.jpg
2020-10-18 21:16:24 INFO     Downloading /home/user/iCloud/2020/IMG_0774.HEIC
2020-10-18 21:16:24 INFO     Downloading /home/user/iCloud/2020/IMG_0773.HEIC
2020-10-18 21:31:00 INFO     /home/user/iCloud/2020/camphoto_959030623.jpg already exists.
2020-10-18 21:31:00 INFO     /home/user/iCloud/2020/camphoto_1804928587.jpg already exists.
2020-10-18 21:31:00 INFO     /home/user/iCloud/2020/IMG_1267.HEIC already exists.

I think it may be related to multi-threaded downloads, as I haven't seen the error when using the --threads-num 1 option, and I've downloaded my entire library multiple times tonight.

This was referenced Oct 21, 2020
@AndreyNikiforov
Copy link
Collaborator

Is there a way to retry aborted or skipped files with filename? Havent found it in the doc.

Latest version of icloudpd download files with .part extension and rename only once download completes. Next time you run icloudpd all aborted files (with .part extension) will be re-downloaded. There is no support for resuming downloads.

There is no functionality to retry specific file, icloudpd will retry all aborted files. Latest version 1.6.2 encourages to use only one download thread and later versions will remove multithreaded downloading, so you should have at most one aborted file.

@AndreyNikiforov
Copy link
Collaborator

@HarrisonOates @nihelmasell @Monsterbacke007 Do you still experience the issue with icloudpd 1.6.2 and --threads-num 1

@nihelmasell
Copy link

@HarrisonOates @nihelmasell @Monsterbacke007 Do you still experience the issue with icloudpd 1.6.2 and --threads-num 1

I didn't try it yet. What's the problem with the solution I used? Is it actually NOT downloading all iCloud files? I don't want to fix something that seems to work OK so far.

@AndreyNikiforov
Copy link
Collaborator

@HarrisonOates @nihelmasell @Monsterbacke007 Do you still experience the issue with icloudpd 1.6.2 and --threads-num 1

I didn't try it yet. What's the problem with the solution I used? Is it actually NOT downloading all iCloud files? I don't want to fix something that seems to work OK so far.

@nihelmasell The solution you mentioned seems to be related to encoding. I saw such encoding error once and it was a different message from the one in this issue. IOError has been happening due to multi-threaded downloading, which has been changed to 1 by default in 1.6.2.

If you do not see IOError any more, I'll close the issue.

@willytylee
Copy link

I chmod -R to my NAS icloud folder to 755, and the error passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants