Deleting photosets is not working
Hello.
I tried to delete the photoset using this command:
$ docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt:ro -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli delete -vvv "2017.08.25-Vltava"
[2018-06-24 18:39:48] delete.DEBUG: Load configuration: /data/config.yml [] []
[2018-06-24 18:39:48] delete.INFO: [main] get photosets [] []
[2018-06-24 18:39:49] delete.NOTICE: [main] start deleting files [] []
[2018-06-24 18:39:50] delete.INFO: [photoset] 2017.08.25-Vltava: 19 [] []
[2018-06-24 18:39:50] delete.INFO: [photo] 1/1 deleted 42874479081 [] []
[2018-06-24 18:39:51] delete.INFO: [photo] 1/2 deleted 42874480851 [] []
[2018-06-24 18:39:51] delete.INFO: [photo] 1/3 deleted 42874482351 [] []
[2018-06-24 18:39:51] delete.INFO: [photo] 1/4 deleted 41064330670 [] []
[2018-06-24 18:39:52] delete.INFO: [photo] 1/5 deleted 41064332670 [] []
[2018-06-24 18:39:52] delete.INFO: [photo] 1/6 deleted 41064334550 [] []
[2018-06-24 18:39:52] delete.INFO: [photo] 1/7 deleted 41064336260 [] []
[2018-06-24 18:39:53] delete.INFO: [photo] 1/8 deleted 41064337810 [] []
[2018-06-24 18:39:53] delete.INFO: [photo] 1/9 deleted 41064339380 [] []
[2018-06-24 18:39:53] delete.INFO: [photo] 1/10 deleted 41064340890 [] []
[2018-06-24 18:39:54] delete.INFO: [photo] 1/11 deleted 41064341980 [] []
[2018-06-24 18:39:54] delete.INFO: [photo] 1/12 deleted 41064343370 [] []
[2018-06-24 18:39:54] delete.INFO: [photo] 1/13 deleted 29002521218 [] []
[2018-06-24 18:39:55] delete.INFO: [photo] 1/14 deleted 29002523608 [] []
[2018-06-24 18:39:55] delete.INFO: [photo] 1/15 deleted 41974386655 [] []
[2018-06-24 18:39:55] delete.INFO: [photo] 1/16 deleted 41974387735 [] []
[2018-06-24 18:39:56] delete.INFO: [photo] 1/17 deleted 41974389485 [] []
[2018-06-24 18:39:56] delete.INFO: [photo] 1/18 deleted 41974391335 [] []
[2018-06-24 18:39:56] delete.INFO: [photo] 1/19 deleted 41974393715 [] []
Unfortunately the photoset with all photos are still visible in Flickr.
Looks like nothing was changed...
@ruzickap I'm not sure. Is it possible that these images are also in other photo sets? Or maybe you doesn't have the permissions to delete photos?
Edit: I'm currently not able to authenticate with a new created App.
Client error response
[status code] 401
[reason phrase] Unauthorized
[url] https://api.flickr.com/services/rest/
So the Flick API seams to be fucked up, like always.
Edit: Can you check if flickr.test.login is working for you. It always fails.
Edit: Please try it again with the newest develop version.
Here is the test I did (with latest):
pruzicka@peru:/tmp/x$ find .
.
./my_pics
./my_pics/20171118-135422.jpg
./my_pics/20171118-133941.jpg
./my_pics/20171118-133403.jpg
pruzicka@peru:/tmp/x$ docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt:ro -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli albums | grep test123
pruzicka@peru:/tmp/x$ docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt:ro -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli upload -vv --config=/data/config.yml --tags "test123" --sets "test123" my_pics
[2018-06-26 07:19:44] upload.INFO: [dir] upload dir: my_pics [] []
[2018-06-26 07:19:44] upload.INFO: [file] upload "20171118-133403.jpg" 13.18MB [] []
[file] 100.00% [###################################] 13,186,062 2.20MB/s
[2018-06-26 07:19:50] upload.INFO: [file] status: OK - ID 43015950271 [] []
[2018-06-26 07:19:50] upload.INFO: [photoset] create test123 ... [] []
[2018-06-26 07:19:50] upload.INFO: [photoset] create test123 OK - ID 72157695230767042 [] []
[2018-06-26 07:19:50] upload.INFO: [file] add to sets ... [] []
[2018-06-26 07:19:51] upload.INFO: [file] added to sets: 67042 OK [] []
[2018-06-26 07:19:51] upload.INFO: [file] upload "20171118-133941.jpg" 7.98MB [] []
[file] 100.00% [###################################] 7,977,264 1.33MB/s
[2018-06-26 07:19:55] upload.INFO: [file] status: OK - ID 43015952111 [] []
[2018-06-26 07:19:55] upload.INFO: [file] add to sets ... [] []
[2018-06-26 07:19:55] upload.INFO: [file] added to sets: 67042 OK [] []
[2018-06-26 07:19:55] upload.INFO: [file] upload "20171118-135422.jpg" 14.57MB [] []
[file] 100.00% [###################################] 14,576,345 2.43MB/s
[2018-06-26 07:20:00] upload.INFO: [file] status: OK - ID 43015953371 [] []
[2018-06-26 07:20:00] upload.INFO: [file] add to sets ... [] []
[2018-06-26 07:20:01] upload.INFO: [file] added to sets: 67042 OK [] []
[2018-06-26 07:20:01] upload.NOTICE: [main] total uploaded: 0 [] []
[2018-06-26 07:20:01] upload.NOTICE: [main] total files: 3 [] []
[2018-06-26 07:20:01] upload.NOTICE: [main] files uploaded: 3 [] []
[2018-06-26 07:20:01] upload.NOTICE: [main] files failed: 0 [] []
pruzicka@peru:/tmp/x$ docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt:ro -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli albums | grep test123
test123
pruzicka@peru:/tmp/x$ docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt:ro -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli delete -vv --config=/data/config.yml test123
[2018-06-26 07:20:47] delete.INFO: [main] get photosets [] []
[2018-06-26 07:20:49] delete.NOTICE: [main] start deleting files [] []
[2018-06-26 07:20:49] delete.INFO: [photoset] test123: 3 [] []
[2018-06-26 07:20:49] delete.INFO: [photo] 1/1 deleted 43015950271 [] []
[2018-06-26 07:20:49] delete.INFO: [photo] 1/2 deleted 43015952111 [] []
[2018-06-26 07:20:50] delete.INFO: [photo] 1/3 deleted 43015953371 [] []
pruzicka@peru:/tmp/x$ docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt:ro -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli albums | grep test123
test123
In the example above I uploaded the photos to new "album" and tried to delete the photos form album "test123", but it's still visible in Flickr GUI with all photos...
When I used the develop docker image I got errors when doing the delete:
pruzicka@peru:/tmp/x$ docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt:ro -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli:develop upload -vv --config=/data/config.yml --tags "test123" --sets "test123" my_pics
[2018-06-26 07:25:48] upload.INFO: [dir] upload dir: my_pics [] []
[2018-06-26 07:25:48] upload.INFO: [file] upload "20171118-135422.jpg" 14.57MB [] []
[file] 100.00% [###################################] 14,576,345 2.43MB/s
[2018-06-26 07:25:53] upload.INFO: [file] status: OK - ID 41206004450 [] []
[2018-06-26 07:25:53] upload.INFO: [photoset] create test123 ... [] []
[2018-06-26 07:25:53] upload.INFO: [photoset] create test123 OK - ID 72157697894429814 [] []
[2018-06-26 07:25:53] upload.INFO: [file] add to sets ... [] []
[2018-06-26 07:25:53] upload.INFO: [file] added to sets: 29814 OK [] []
[2018-06-26 07:25:53] upload.INFO: [file] upload "20171118-133941.jpg" 7.98MB [] []
[file] 100.00% [###################################] 7,977,264 1.33MB/s
[2018-06-26 07:25:57] upload.INFO: [file] status: OK - ID 43016042701 [] []
[2018-06-26 07:25:57] upload.INFO: [file] add to sets ... [] []
[2018-06-26 07:25:57] upload.INFO: [file] added to sets: 29814 OK [] []
[2018-06-26 07:25:57] upload.INFO: [file] upload "20171118-133403.jpg" 13.18MB [] []
[file] 100.00% [###################################] 13,186,062 2.20MB/s
[2018-06-26 07:26:03] upload.INFO: [file] status: OK - ID 43016043391 [] []
[2018-06-26 07:26:03] upload.INFO: [file] add to sets ... [] []
[2018-06-26 07:26:03] upload.INFO: [file] added to sets: 29814 OK [] []
[2018-06-26 07:26:03] upload.NOTICE: [main] total uploaded: 0 [] []
[2018-06-26 07:26:03] upload.NOTICE: [main] total files: 3 [] []
[2018-06-26 07:26:03] upload.NOTICE: [main] files uploaded: 3 [] []
[2018-06-26 07:26:03] upload.NOTICE: [main] files failed: 0 [] []
pruzicka@peru:/tmp/x$ docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt:ro -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli:develop delete -vv --config=/data/config.yml test123
[2018-06-26 07:26:29] delete.INFO: [main] get photosets [] []
[2018-06-26 07:26:30] delete.NOTICE: [main] start deleting files [] []
[2018-06-26 07:26:31] delete.INFO: [photoset] test123: 3 [] []
[2018-06-26 07:26:31] delete.INFO: [photo] 1/1 delete 41206004450 FAILED: stat: fail [] []
[2018-06-26 07:26:31] delete.INFO: [photo] 1/2 delete 43016042701 FAILED: stat: fail [] []
[2018-06-26 07:26:31] delete.INFO: [photo] 1/3 delete 43016043391 FAILED: stat: fail [] []
pruzicka@peru:/tmp/x$ docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt:ro -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli:develop files test123 -vv
[2018-06-26 07:31:02] files.INFO: [main] get photosets [] []
test123 (3)
1/1 41206004450
1/2 43016042701
1/3 43016043391
@ruzickap And when you use it without Docker? Just checkout develop branch.
I do not have php and related tools installed on my machine - that's why I'm using docker image which has everything "inside"...
I found the "develop" docker image here: https://hub.docker.com/r/thefox21/flickr-cli/builds/bhvsvoaur2vf52zs5enga6z/
I expected, the thefox21/flickr-cli:develop image in docker hub contains the develop source code...
This fail in FAILED: stat: fail [] [] is directly coming from Flickr. So I don't know what the problem is.
Sometimes Flickr is very very strange on processing data. Read my blog post about Yahoo's Customer Data. I personally wouldn't store any photos on Flickr anymore.
Ok...
The strange is that the stable release of flickr-cli looks like it's really removing the photos (comparing to the develop):
# Stable
docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt:ro -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli delete -vv --config=/data/config.yml test123
[2018-06-27 11:21:50] delete.INFO: [main] get photosets [] []
[2018-06-27 11:21:51] delete.NOTICE: [main] start deleting files [] []
[2018-06-27 11:21:51] delete.INFO: [photoset] test123: 3 [] []
[2018-06-27 11:21:51] delete.INFO: [photo] 1/1 deleted 43040736231 [] []
[2018-06-27 11:21:52] delete.INFO: [photo] 1/2 deleted 43040737391 [] []
[2018-06-27 11:21:52] delete.INFO: [photo] 1/3 deleted 43040738651 [] []
#Develop
$ docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt:ro -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli:develop delete -vv --config=/data/config.yml test123
[2018-06-27 11:23:01] delete.INFO: [main] get photosets [] []
[2018-06-27 11:23:02] delete.NOTICE: [main] start deleting files [] []
[2018-06-27 11:23:02] delete.INFO: [photoset] test123: 3 [] []
[2018-06-27 11:23:02] delete.INFO: [photo] 1/1 delete 43040736231 FAILED: stat: fail [] []
[2018-06-27 11:23:03] delete.INFO: [photo] 1/2 delete 43040737391 FAILED: stat: fail [] []
[2018-06-27 11:23:03] delete.INFO: [photo] 1/3 delete 43040738651 FAILED: stat: fail [] []
Both versions can see the content of the test123 album:
pruzicka@peru:/tmp/x$ docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt:ro -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli:develop files -vv --config=/data/config.yml test123
[2018-06-27 11:24:16] files.INFO: [main] get photosets [] []
test123 (3)
1/1 43040736231
1/2 43040737391
1/3 43040738651
pruzicka@peru:/tmp/x$ docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt:ro -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli files -vv --config=/data/config.yml test123
[2018-06-27 11:24:24] files.INFO: [main] get photosets [] []
test123 (3)
1/1 43040736231
1/2 43040737391
1/3 43040738651
Both versions can properly download the photos:
$ docker run --rm -it -u 1000:1000 -v /tmp/x:/mnt -v /home/pruzicka/.flickr-cli:/data:ro thefox21/flickr-cli:develop download -vv --config=/data/config.yml test123
[2018-06-27 11:25:09] download.INFO: Downloading to Album-based directories in: photosets [] []
[2018-06-27 11:25:10] download.INFO: [main] get photosets [] []
[2018-06-27 11:25:11] download.INFO: [photoset] test123 [] []
[2018-06-27 11:25:11] download.INFO: [dir] create: photosets/test123 [] []
[2018-06-27 11:25:11] download.INFO: [photoset] test123: get photo list [] []
[2018-06-27 11:25:11] download.INFO: [page] 1 [] []
[2018-06-27 11:25:12] download.INFO: [photo] 43040736231, farm 1, server 925, 20171118-135422.jpg.jpg, '', N/A [] []
[file] 14,574,406 8.17MB/s
[2018-06-27 11:25:15] download.INFO: [photo] 43040737391, farm 1, server 918, 20171118-133941.jpg.jpg, '', N/A [] []
[file] 7,975,325 5.51MB/s
[2018-06-27 11:25:18] download.INFO: [photo] 43040738651, farm 2, server 1801, 20171118-133403.jpg.jpg, '', N/A [] []
[file] 13,184,123 7.44MB/s
[2018-06-27 11:25:21] download.INFO: [main] total downloaded: 35.73MB (35733854) [] []
[2018-06-27 11:25:21] download.INFO: [main] total files: 3 [] []
[2018-06-27 11:25:21] download.INFO: [main] exit [] []
pruzicka@peru:/tmp/x$ find photosets -ls
947631 0 drwxr-xr-x 3 pruzicka pruzicka 60 Jun 27 13:25 photosets
947798 0 drwxr-xr-x 2 pruzicka pruzicka 100 Jun 27 13:25 photosets/test123
949022 12876 -rw-r--r-- 1 pruzicka pruzicka 13184123 Jun 27 13:25 photosets/test123/20171118-133403.jpg.jpg
947941 7792 -rw-r--r-- 1 pruzicka pruzicka 7975325 Jun 27 13:25 photosets/test123/20171118-133941.jpg.jpg
948708 14236 -rw-r--r-- 1 pruzicka pruzicka 14574406 Jun 27 13:25 photosets/test123/20171118-135422.jpg.jpg
I know the Flickr is probably not the best service, but it's the only one where you can store+download 1TB of JPEGs without any kind of resizing/recompressing.
I'm using it as one of the backups for all my JPEGs.
The strange is that the stable release of flickr-cli looks like it's really removing the photos
This just looks like because the master version doesn't show the state after the API call. I added the state to the debug message some days ago. So the develop branch is more accurate.