Product: TIBCO Spotfire®
Errors when trying to save TIBCO Spotfire analysis: "Unable to save the file" "DirectoryNotFoundException at mscorlib" "Could not find a part of the path".
If the TIBCO Spotfire Analyst client has been open for a long time, the following error may be seen while saving the analysis file:
Error message: Unable to save the file test_analysys_file.dxp.FileNotFoundException at mscorlib:Could not find file 'C:\Users\test_user\AppData\Local\Temp\TIBCO\Spotfire\<version>\xxxx-xxxx\xxxxxxx.xxx.tmp'.Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Spotfire.Dxp.Framework.Persistence.EmbeddedResource.OpenRead() at Spotfire.Dxp.Framework.Persistence.ImmutableEmbeddedResource.Save(Stream stream) at Spotfire.Dxp.Application.AnalyticItems.PersistedBookmarks.WriteToZip(ZipWriter zipWriter, CxxSession session) at Spotfire.Dxp.Application.AnalyticItems.BookmarkManager.Spotfire.Dxp.Framework.Persistence.IDxpFileContributor.OnWriteToDxp(DocumentLocationType documentLocationType, ZipWriter zipWriter) at Spotfire.Dxp.Framework.Persistence.DxpFileContributorRegistry.OnWriteToDxp(DocumentLocationType documentLocationType, ZipWriter zipWriter) at Spotfire.Dxp.Framework.Persistence.PersistenceManager.Save(DocumentTypes documentType, DocumentNode doc, IDocumentSaveSettings settings, Stream targetStream) at Spotfire.Dxp.Framework.Persistence.PersistenceManager.Save(DocumentTypes documentType, DocumentNode doc, IDocumentSaveSettings settings, String fileName) at Spotfire.Dxp.Framework.DocumentModel.DocumentManager`1.<>c__DisplayClass63_0.<Save>b__0() at Spotfire.Dxp.Forms.Application.FormsProgressService.ProgressThread.DoOperationLoop()
This error is complaining about a missing ".tmp" file under the path mentioned in the above error message. Spotfire creates temporary files while analysis files are being built. When saving the analysis file, Spotfire uses those temporary files. If there is an anti-virus or garbage collection program running on the machine, it might end up deleting these temporary files on regular basis. As a result, Spotfire will not be able to find these temporary files while saving the analysis file and will throw this error.
Once this occurs, there is no way to recover from this error (unless IT can recover the deleted .tmp files that Spotfire needs to continue with the save process).
One way to avoid the issue is to save the analysis frequently. Alternatively, if the changes you have made are in pages or visualizations then these can be copied to another instance of Spotfire:
- Launch another instance of the TIBCO Spotfire installed client (keeping open the report which cannot be saved)
- Open the last saved version of report again
- Copy those new/modified pages or visualizations from the report which cannot be saved (see Copying Data, Pages or Visualizations for details)
- Paste those pages or visualizations into the newly opened instance of the TIBCO Spotfire installed client
- Save the newly opened report where you pasted the new/modified content