"Can't open perl script "-e"; No such file or directory" running ExifTool.exe

Started by Allen B. Taylor, February 10, 2011, 01:04:48 PM

Previous topic - Next topic

Allen B. Taylor

When attempting to run ExifTool.exe on a Windows XP Embedded system, I get the error message:
"Can't open perl script "-e"; No such file or directory".
No command line arguments are specified, I just run ExifTool from cmd prompt. On a regular Windows system, it displays the help.

Phil Harvey

It sounds like this installation is corrupted.  I suggest following the uninstalling instructions, then re-install.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Allen B. Taylor

Phil,

I did the reinstall and it still doesn't work. On my WinXPe machine, the C: drive is 200 MB with only 20 MB free. (It's a stripped-down version of WinXP.) It also has a write filter engaged so that writes to it are not saved between reboots. So to rule out any problems with this disk, I redefined TEMP to point to my data disk, a 4 GB NTFS volume, drive M:.

mkdir M:\Temp
set TEMP=M:\Temp

I downloaded latest version of ExifTool windows executable and extracted to my M: drive in another folder. Renamed exiftool(-k).exe to exiftool.exe and ran for the first time on a freshly rebooted system. I still get the same error message.

I looked in the TEMP directory and it contains the following files:

M:\Temp
  par_SYSTEM
    cache-exiftool-8.48
      exiftool.exe 53,299 bytes (much smaller than the distributed one)
      perl58.dll 815,185 bytes

Only 2 files. I noticed that on my regular Window system there are many more files, plus an inc directory, etc. Do you think the first-time run is failing, or is this normal behaviour?

Allen

Phil Harvey

Hi Allen,

As far as I know, the unpacker always unpacks all of the files the first time it runs.  So it sounds like a problem to me if the cache-exiftool-8.48 directory contains only 2 files.

I can't think of any way to diagnose this since the PAR packer isn't very good at issuing warning messages.  It sounds like you have lots of disk space so this shouldn't be the problem.

Does it unpack only the same 2 files each time?

Can you validate the MD5 checksum of your distribution?:

MD5 (exiftool-8.48.zip) = f0976777e2ebef39693d78a5661bc323

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Allen B. Taylor

Hi Phil,

Yes, it unpacks the same two files each time. At this point, I'm wondering if my WinXPe system is missing something that ExifTool needs. I did a dependency checker on the cached (small) version of exiftool and I believe I have everything (it needs WS2_32.DLL and SHELL32.DLL; both are present in my system).

I don't know much about this PAR thing. Anyplace you can suggest to find out more about this?

Allen

Phil Harvey

The PAR packager can be found here.

The documentation mentions some environment variables like PAR_GLOBAL_DEBUG and PAR_VERBOSE that look interesting...

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Allen B. Taylor

Phil,

Setting PAR_GLOBAL_DEBUG and PAR_VERBOSE each to 1 does nothing when running exiftool. These must only have an effect when packing, not unpacking.

I tried copying a freshly created cache from my WinXP system to the XPe system, but it still gives the same error. I'm guessing that exiftool first unpacks the small version of exiftool and the perl DLL, then does something else (which fails under my XPe), and then unpacks the rest. Regardless of whether the cache is populated, the same failure occurs.

What would exiftool be doing to make it think it needs to execute a script called "-e"?

Allen

Phil Harvey

Quote from: Allen B. Taylor on February 10, 2011, 05:04:26 PM
Setting PAR_GLOBAL_DEBUG and PAR_VERBOSE each to 1 does nothing when running exiftool. These must only have an effect when packing, not unpacking.

I was wondering about this.

Quote
What would exiftool be doing to make it think it needs to execute a script called "-e"?

ExifTool doesn't run Perl scripts (other than itself), so this must be a message from PAR.

How much RAM does your system have?  I suppose the unpacker could fail if it doesn't have enough.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Allen B. Taylor

XPe is running on a PC/104 stack, specifically, a CMA22MCS1200HR-1024 with 1GB RAM. I don't think RAM is an issue.

Likely, it's some strange bug in PAR that only occurs on XPe. Since I can't debug it here, I'm thinking of installing a Perl environment and running your Perl distribution. Will ExifTool run under Strawberry Perl?

Allen

Phil Harvey

Hi Allen,

Installing Perl yourself does look like the way to go.  ExifTool will run under a basic Perl installation, but you may need to install optional packages to enable some extra features.  The dependencies section of the README of the full distribution explains this:

QuoteDEPENDENCIES

Requires Perl version 5.004 or later.  No other special libraries are
required, however the following modules are recommended for decoding
compressed and/or encrypted information from the indicated file types, and
for calculating digest values for some information types:

Archive::Zip        (ZIP, DOCX, PPTX, XLSX, ODP, ODS, ODT, EIP and iWork)
Compress::Zlib      (DNG, PNG, PDF, DCM, MIE and SWF files)
Digest::MD5         (PDF files, IPTC information, and Extended XMP in JPEG)
Digest::SHA         (PDF with AES-256 encryption)
IO::Compress::Bzip2 (RWZ files)

- Phil

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Allen B. Taylor

I'm using ExifTool to add metadata (standard + custom XMP) to JP2 (JPEG 2000) files. Not the same as old JPEG, so I should be alright. I'll let you know how it goes.

Allen B. Taylor

It works! I installed the "portable" version of Strawberry Perl (requires no installation, just unzip, path setup and definition of TERM variable), installed Image-ExifTool in my application directory, wrote a quick exiftool.bat to run exiftool.pl under perl (so I don't have to change the application code that runs exiftool), and it works. I bit ugly, but it works.

I'm still puzzled why PAR would behave so oddly under XPe. But like you said, this is a PAR problem, not an ExifTool problem.

Thanks for thinking this one through with me.

Allen

Phil Harvey

I'm puzzled by the PAR problem too, but I'm glad you could install Perl and get it working that way.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

kmmareek

I have the same problem on XP Pro SP2. In par-USER direstory i have only 2 files. When I copied all the files from par-USER (from another computer where exiftool working fine) to my computer par-USER are still the same error. What i have to do ?

Phil Harvey

Try typing "set" then RETURN at the cmd.exe prompt, and post the results.  I may get a hint about the problem if I can see your system environment settings.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).