Skip to main content
Participating Frequently
September 24, 2012
Question

Layer Comps To Files - Export error: Could not complete this operation. There are no user slices

  • September 24, 2012
  • 6 replies
  • 23803 views

I have been using the Export Layer Comps To Files scrips that ships with Adobe Photoshop CS5 for a while and found it very useful, apart from the numbers it automatically adds as a prefix to the layercomp name.

A friend pointed me in the direction of a altered version of this scrips which removes the numbers and only exports the layer comp name, gerat I thought. Not great! After using this successfully for a while the scrip started to throw up errors whenever I attempted to export. Either "No layer comps found" or "Adobe Save for Web & Devices Error: Could not complete this operation. There are no user slices." As I knew there were layercomps for the first error and knew that I had not created any slices for the second error I was pretty miffed. Fortunately I had the foresight to make a copy of the original script from the Photoshop presets library.

I have since deleted the offending script out of my presets folder and copied the original script back in however the error still persists. I constantly receive Adobe Save for Web & Devices Error: Could not complete this operation. There are no user slices. I have searched the forums and around the net to try and find a solution for this problem but none seem to present themselves. I am perplex how this error can persist when the original script is now being used.

If there's is anyone out there who can help me resolve this I'd be most grateful. As I say I've tried to resolve this myself and am pretty computer savvy but this one has defeated me

Thanks in advance

This topic has been closed for replies.

6 replies

Participant
November 27, 2018

having the same issue, 2018... you would think adobe would sort this out.

i'm trying to export artboards to PNG's as i was doing forever... only works with JPG's. wouldn't export to PNG...

if anyone has a solution for that please...

Known Participant
November 27, 2018

The one that comes with it is always in preview

I feel very bad. The preview export is very slow.

Participant
September 21, 2016

I apologise that I have reopened this four-year-old thread but I had this kind of problem this morning on CC 2015.5.0 (20160603.r.88 x64).

(I realise I am using Export Layers to Files and not Export Layer Comps to Files, but the issue seems to be the same)

The issue came up when I tested out the Save For Web (Legacy) option to see if it could meet my needs, and did some experiments with slices.

When I went back to Export Layers to Files this morning, I started getting this error. Tried resetting the PS preferences etc. to no avail.

In the end, I went back to Save For Web (Legacy) and ran another complete export. Then went back to the Export Layers to Files and it worked just fine.

This may not be the solution for everyone but I think possibly something got 'stuck' yesterday. I have no idea why SFW is even being invoked when EL2F is called, particularly as SFW is a legacy and distinct set of code (by Adobe's own definition).

Participant
November 27, 2018

having the same issue, 2018... you would think adobe would sort this out.

i'm trying to export artboards to PNG's as i was doing forever... only works with JPG's. wouldn't export to PNG...

if anyone has a solution for that please...

Participant
October 9, 2014

I had the SAME issue. The reason is SIMPLE, don't know why this has to be like this and its NOT showing on Lynda's tutorials.

  1. Open - Photoshop (make sure you are working the original file with all the layers, NOT flatten.)
  2. Click on the menu - Window
  3. Select - ¨Layer Comps¨ Also open ¨Layers¨
  4. Now On the Layers Panel you opened display the 1st page you would like to have as the PDF file.
  5. On the Layer Comps, click on ¨Create New Layer Comp¨ (you can also rename the layer name, I best is to number it)
  6. Repeat step 4, but instead of display the 1st page, display the 2nd
  7. Now Repeat Step 5
  8. Once you do this a few times until you reach the actual amount of X pages, Go to ¨File > Scrips > Layers Comps to PDF
  9. On the Browse button, select place where you would like to save the PDF and make sure you name you file, then Click Run Button
  10. Open the location where you saved your PDF. Your file should be there!

GOOD LUCK! 

Participant
October 13, 2012

The problem seems to be already solved, but I'm commenting this for future reference.

This has happened to me too and I think I know what causes it.

It happens when you...

1) Do "Save for Web" with the "All User Slices" selected in the dropdown menu "Slices".

(This can only be done with a file that has a user slice)

2) Then try to use the "Layer Comp to Files" script to a file that doesn't have any slices.

To avoid this you need to once open a file that "has" a user slice and save with

the "All Slices" option in the "Slices" menu and then go back to the file you want

to run the script to.

When you run the script, the saved "Slices" option from the previous export seems to

be used and causes an error when there are no user slice.

I also found a fix to the script to avoid this error to come out.

This can be also applied to the fix to "remove the numbers" added to the head of the

exported file names.

The number removal script goes something like this...

var fileNameBody = exportInfo.fileNamePrefix;

if (fileNameBody != "") fileNameBody += "_";

fileNameBody += compRef.name;

this should replace the "Layer Comps to Files.jsx" lines 188-190.

In addition to that, the script below needs to be added below line 818 and line 863.

(This line numbers are those before any alterations to the "Layer Comps to Files.jsx" script)

var idSWsl = charIDToTypeID( "SWsl" );

var idSTsl = charIDToTypeID( "STsl" );

var idSLAl = charIDToTypeID( "SLAl" );

desc4.putEnumerated( idSWsl, idSTsl, idSLAl );

The line right above where the above script should be inserted should read as the following...

desc4.putPath( id44, new File( exportInfo.destination + "/" + fileNameBody + ".png") );

Actually it can be added any where after the "desc4" variable is declared but I specified just

to make it simple.

This sets the "Save for Web" "Slices" settings to "All User Slices".

October 16, 2012

hi,

I did what you e-maild me and it works flawlessly, THANK YOU! this scrip will save me so much time.

my other issue now is when i change the name in the slice it will save all the layer comps to file but all layer comp to files are blank except the last comp, the script still fully runs and throws out the window that says it was successful but in the folder location theirs is only a single file of the last slice that works... all other files are completely blank. (i can do a video of the problem and send it if you need further description)

thank you again for all your help.

george

Participant
October 16, 2012

I don't think I fully understand your situation. I might need to see the video you suggested.

Inspiring
September 24, 2012

Just curious, where did you find the modified version of the Layer Comps To Files script? I have modified that script several times in the past( and posted the modified version) and I don't see anything that would cause that error if just the file naming was changed. I would like to see that version to try and find if it could cause problems.

I would second Paul's suggestion. I think the problem has more to do with corrupted preferences than the script itself.

TKerchyAuthor
Participating Frequently
September 25, 2012

Wow that was really quick, thanks for the response Paul and Michael.

I will try to reset my preferences and update this post with the outcome.

Micheal you can download the export script I used from this link http://www.tenniswood.co.uk/technology/how-to-export-to-layer-comps-to-files-without-the-leading-numbers/

You mentioned that you have updated this script? would it be possible to get a copy or point me in the right direction? I have looked for this in the past but not had any joy.

Thanks again for the help guys, really appriciate it

TKerchyAuthor
Participating Frequently
September 25, 2012

Hi Guys,

I have deleted the Photoshop preferences by following the instructions in the link however the problem has persisted. The Adobe save for Web & Devices Error: Could not complete this operation. There are no user slices

When selecting File > Scripts > Layer Comps to Files...

Destination: My HDD

File Name Prefix: None

Selected Layer Comps Only: Unchecked

File Type: PNG-24

Include ICC Profile: Checked

PNG-24 Options - Transparency: Checked, Interlaced: Unchecked

I am 100% certain that the file doesn't contain any slices and the he file is stored locally on my machine.

The version of Photoshop I am running is updated: Photoshop CS5 Extended v12.1 x64

Any other suggestions would be appriciated.

Paul Riggott
Inspiring
September 24, 2012

When this sort of thing happens the first thing to try is reset Photoshop preferences then try again.

http://forums.adobe.com/thread/375776