sortphotos icon indicating copy to clipboard operation
sortphotos copied to clipboard

Can't use an undefined value as a SCALAR reference at <shortened>\src\Image-ExifTool\lib\Image\ExifTool.pm line 6303.

Open v1gnesh opened this issue 9 years ago • 4 comments

Hi,

I'm on Windows 7 64-bit, the latest of Python 2.7, and the latest of ActivePerl.

I invoked the program --> python sortphotos.py --recursive --sort %Y/%B G:\ G:\sorted photos > G:\result.txt

I was really stoked to find this program, and ran this on the entire drive (as you can see above) as I've .jpg's everywhere; a real mess.

Now I believe sortphotos.py is stuck since exiftool has returned an error, and won't give control back to sortphotos.py. The output file isn't growing in size and I don't see any updates to it since this error.

Please help?

It would be ridiculously helpful if this program worked for me! :+1:

EDIT: Wow, thank God it didn't work. Apparently it doesn't care about the other files in the folder and just renames, dedupes, and moves shit to the destination.

@andrewning, it would be ridiculously helpful if we could restrict the operations to the known picture and video formats (JPEG, JPG, PNG, etc.)

And to continue my wishful thinking... an undo operation based on the output statements -

[698/2674] Source: G:/some/long/path/Disc.jpg Date/Time: 2009-07-15 12:30:16 Corresponding Tags: EXIF:DateTimeOriginal Destination (move): G:\sortedphotos\2009\July\Disc.jpg

I could have avoided this by using the test parameter. Sigh...

v1gnesh avatar Jun 14 '15 05:06 v1gnesh

@v1gnesh Sorry you are having troubles.

  • It does restrict operations to known picture and video formats. It processes only what ExifTool can obtain tags for, which is only image files.
  • It does not do any renaming unless you tell it to and no deduping occurs unless things are exactly the same in both filename and a file hash.
  • You mentioned an error but I can't help debug without a longer stack trace or even better a picture that causes the problem along with the track trace.
  • undo would be nice. that feature does not currently exist. I recommend using the test feature, especially on such a large directory structure, but looks like you've discovered that already. You can always perform another move on the new directories once you've tested things to your liking.

andrewning avatar Jun 17 '15 18:06 andrewning

@andrewning

Hundreds of mp3 files were re-organized by their date of creation; so now it's just a bunch of mp3's in folders sorted by date. I've made a huge mess assuming that the operation is limited to picture formats.

v1gnesh avatar Jun 26 '15 15:06 v1gnesh

You're right, it looks like exiftool handles some audio files as well: http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/ID3.html

The functionality of exiftool is out of my hands but I'm sure I could find a way to ignore those. You're the first person I've heard of trying to use the tool in this way so this has not come up before.

On Fri, Jun 26, 2015 at 10:05 AM, v1gnesh [email protected] wrote:

@andrewning

Hundreds of mp3 files were re-organized by their date of creation; so now it's just a bunch of mp3's in folders sorted by date. I've made a huge mess assuming that the operation is limited to picture formats.

Reply to this email directly or view it on GitHub: https://github.com/andrewning/sortphotos/issues/52#issuecomment-115721125

andrewning avatar Jun 26 '15 15:06 andrewning

@andrewning Yup. I don't have photos in specific folders to begin with. They're just all over the place in an external drive. It's not really disorganised when all your photos are already in a target folder.

v1gnesh avatar Jun 27 '15 05:06 v1gnesh