jhunter_dps
5 years agoOccasional Contributor
slPacker Pack Method Throwing "Unable to pack the files" Error
I am attempting to compress the .mht file of a test run's log results and attach it to an email and I am attempting to use the slPacker object as a means to do it, however when I attempt to run the "...
- 5 years ago
Here's the solution from the support case that worked:
>>
To resolve this issue, please change the first two lines to the following:
workDir = Project.ConfigPath + "ExportedResults\\" packedResults = Project.ConfigPath + "CompressedResults\\"
Afterwards, the test will pack without issue.
The reason the file is not getting packed is because when the first two lines are "\\Exp" and "\\Com", the project path becomes:ProjectPath\\\\Exp
Which is not a valid path. When the log is exported afterwards, the path then becomes:ProjectPath\\\\ExportedResultsTest_DLS
Which is also not a valid path. Because of this, the results are placed in the project folder. TestComplete tries to export the results of an empty folder to a folder called:ProjectPath\\\\CompressedResults
Which doesn't exist as well. This is why the error was occurring. Putting the slashes after the names will create valid folder names which should resolve all of these issues.<<