I have written a script that will move my photo assets from one, more, or all albums to an FTP server. Basically, it is functional. When I select an album (standard iOS albums), the files get moved to the FTP server in tact. The problem I am running into is when I select all the albums, read: a lot of assets (images and video) the process fails on asset.get_image_data.
The error is:
Once this happens, the script breaks down and all kinds of other errors occur. After a number of errors occur Pythonista breaks and I am returned to the iOS home.
As for quantity, the scripts tend to break down after 1400-ish files have moved successfully. It doesn't seem as if the actual image or video is corrupted as the same file copies without a problem during a smaller transfer.
I have uploaded no code as it crosses a few files. It is actually very simple.
1. Get an album or list of albums
2. Create an FTP connection
3. For each album step through each "asset" in the album.
4. For each asset create a filename to be used on the FTP server
5. Get the asset.get_image_data buffer and use ftplib storbinary to send the asset to the FTP server.
Like I said, this works for something under 1400 images/videos.
Anyone else have similar issues and might be able to point me in a direction to solve the problem?
Thanks in advance.
Bill