Highlighted

IOError Unable To Save Edits In a Batch Export JPG Using JJMack's Script

New Here ,
Oct 08, 2020

Copy link to clipboard

Copied

Hi, I am new here so excuse me for being a newbie.

 

My issue is that I am attempting to use the "BatchMockupTemplates" From JJMack's Website (Very useful, Thank you JJMack!) The batch mockup script works very well sometimes, however, without any consistency it runs into this error: 

“IOError: General Photoshop Error Occurred….. Because the file is already in use or was left open by another application...”

Does anyone have an idea how I might go about fixing this error? I can’t seem to find anyone else solving this problem on Windows 10 with the current version of Photoshop. The mockup script works beautifully sometimes with zero errors! But there are some instances where it will not even work once. This error will appear over and over, making the script unusable. I believe I have followed all four rules to a T. 

The script I am referencing is found here and credits to JJMack:

http://www.mouseprints.net/old/dpr/PhotoCollageToolkit.html

Thank you in advance! I genuinely appreciate it. 

TOPICS
Actions and scripting, Problem or error, Windows

Views

80

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

IOError Unable To Save Edits In a Batch Export JPG Using JJMack's Script

New Here ,
Oct 08, 2020

Copy link to clipboard

Copied

Hi, I am new here so excuse me for being a newbie.

 

My issue is that I am attempting to use the "BatchMockupTemplates" From JJMack's Website (Very useful, Thank you JJMack!) The batch mockup script works very well sometimes, however, without any consistency it runs into this error: 

“IOError: General Photoshop Error Occurred….. Because the file is already in use or was left open by another application...”

Does anyone have an idea how I might go about fixing this error? I can’t seem to find anyone else solving this problem on Windows 10 with the current version of Photoshop. The mockup script works beautifully sometimes with zero errors! But there are some instances where it will not even work once. This error will appear over and over, making the script unusable. I believe I have followed all four rules to a T. 

The script I am referencing is found here and credits to JJMack:

http://www.mouseprints.net/old/dpr/PhotoCollageToolkit.html

Thank you in advance! I genuinely appreciate it. 

TOPICS
Actions and scripting, Problem or error, Windows

Views

81

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 08, 2020 0
Most Valuable Participant ,
Oct 08, 2020

Copy link to clipboard

Copied

Try signing out of Windows or Mac then sign back in.  The message seem to indicate there is a conflict. That perhaps some file  was left in a locked state. When you sign out your OS should clean up and unlock any resources locked for your user id.

 

No other user has reported any problem like you have.   I also have no idea of how may users are using my scripts I do not  track downloads.  Some users have submitted problem report and request for  additional features.   So far all the problem reports were  user problems with their templates or batch setup.  The change request were for resizing to different aspect ration distorting the image to the different aspect ratio area.  That is something I will not entertain. If the Aspect ratio change is great automated procedure like Adobe's Content aware scale can not make an acceptable rescale. My script are IMO well tested.

 

 

Personally on my machine I have had some strange Photoshop problems with Photoshop occasionally failing to update a smart object layer correctly.  A very internment problem that happens on long running job after hours of running.  It has not happened in a long time. There have been so many Photoshop updates. I do not know if Adobe fixed the issue or not.

 

The Problem you are having is also strange for I can not believe there is a conflect.  

PS Error.png

It looks like you are using the script Edit option and the file that cans not save is a work file Photoshop would have created for my script when I opened your smart object layer's object. No other application would know about that file its a temp file created by Photoshop. from what I added to the error message it look like I edited your png into the tops smart object layer object and tried to save it to update the smart object layer.  However save failed with that error,  I caught the error and added the info about the png file being used for the update.   Only my script would be editing that work psb Photoshop created and opened for my script to work on.   So a strange File system error has bitten.

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 08, 2020 0
Most Valuable Participant ,
Oct 09, 2020

Copy link to clipboard

Copied

As I wrote " Only my script would be editing that work psb Photoshop created and opened in photoshop for my script to work on."  Photoshop will copy the layer object  to a temp file the first time the Smart object layer object is opened by my script for no temp file exists for it in your temp space. Once created photoshop will have your system open it with the file extension default application which will be Photoshop for I filter out none Photoshop objects. So the temp work file was created and opened by Photoshop because  my script opened your png file "D:\Photoshop Folder\Designs\obj0\Group 2046.png" edited it into the object's  work document then used "Save" and "Close" However, save failed with that error.

 

Is "D:\Photoshop Folder\Designs\obj0\Group 2046.png" the first design in folder obj0. Is this the initial time the object was opened. If it is then when Photoshop copied the object to a new temp files. Your System may have failed to release the lock on the temp file when Photoshop created the temp file and had your system open the temp file with its default application Photoshop.   If not the first replacement design Photoshop would see the temp file exists in your temp space after the first open smart object and it would not have to create it. So it would just have your system system open it again. And my script would edit the next replacement in and save and closet the work document again.    The only other programs  I think that could be accessing this temp file would be a file scanner like a virus scanner or a file explorer.  Was there any other activity beside Photoshop running on your system when these errors occurred in my script?  I do not think the issue is in my script and the issue may not be in Photoshop either.  No one has report they have this problem other than you.

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2020 0
Alek_ LATEST
New Here ,
Oct 09, 2020

Copy link to clipboard

Copied

I have tired ending all the tasks that could be interfering, but the script still ends abruptly. I have Avast and ByteFence installed and I whitelisted the temp file folder, and paused all scans to see if that would help and it seemed like it helped for a little, but it went right back to crashing. I can’t see the temp file accessed in recent files either, and neither of the anti virus/file scanners are scanning the temp files. I just can’t seem to prevent the script from ending abruptly. It usually gets about 10-12 mockups done before crashing and giving me the same error. Sometimes it will only get 1-2 done before crashing. I reinstalled photoshop, and logged out of my user profile as well and no luck there. Even tried turning off internet access and that had no effect. There must be some other program that opens the file I am guessing? It’s just confusing that it is so inconsistent and sometimes my computer can get a lot of mockups done, and other times it cannot do hardly any!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2020 0
Most Valuable Participant ,
Oct 08, 2020

Copy link to clipboard

Copied

Which OS version and Photoshop version are you using.   The error should not happen. There a bug in your OS or Photoshop or there a strange system failure like a ram error.  That PSB file would be created by Photoshop and repeatedly open saved and closed by my script for each replacement image.  That is all my script does. In that process it also opens the replacement image file and edits it contents into the object work file and closed the opened replacement image document. 

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 08, 2020 0
New Here ,
Oct 08, 2020

Copy link to clipboard

Copied

I am on Windows 10 PRO, and I have Photoshop version 21.2.4

I noticed that when I use smart objects photoshop creates a .psb file on my C: hard drive with the name of the smart object layer. I run photoshop off of my D : drive due to space issues. Do you believe that running photoshop from the D : drive while it saves the smart object to the C: Drive  could contribute to the issue?

I have 16GB of ram and my computer is only a few years old so I would be surpried if that was the issue, but it's possible of course.



[ unwanted smilies changed back to D :   by moderator ]

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 08, 2020 0
New Here ,
Oct 08, 2020

Copy link to clipboard

Copied

I believe that fourm thinks I am trying to swear somehow. The emoji faces are covering where I tried to write "D:Drive"

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 08, 2020 0
Most Valuable Participant ,
Oct 08, 2020

Copy link to clipboard

Copied

I think the site forum editor uses some character sequence for emoji. If you hit one you will get the JJMack_1-1602188902720.png not the character string you types.  The object in your template are most likely embedded,  when one is open in Photoshop.  Photoshop will  copy the embedded object into a temp work  file in your user ID temp space.  You can see this somewhat in the error message.  "C:\Users\CAPTAI~1\...\15 in1.psb" the \...\ is most likely  \AppData\Local\Temp\ your user ID temp space.   You are running the same OS and PS I'm  running if all your system updates  and device drivers are installed and updated.  All I can stated is that error has never happened on my machine. The Failures I have had Photoshop through an errors I caught and continued to  run the batch,  A single smart object failed to update correctly. The image remained the same the rest if the replacement files, the next mockup template was fine, There were 84 mockups templates populated with 41 replacement  somewhere  an update of the 14 mockup  template 41 replacement the failure word happen,  Never in the same replacement,  and the failure did not always occurs  over 3,000 jpg and over 3,000 PSD were saved in the saved PSD There was a corrupted  smart object layer.

 

 

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 08, 2020 0