Cannot publish if Word document (docx) is open

word
studio
publish

#1

Scenario: Uistudio open and docx word file is also open.

Publishing the project has failed.

Error: The process cannot access the file ‘I:******\Dev Code\Jake Lewis\Development\Generic Payments Flowchart - V1 and V2 - Working 110917\PaymentProcess\Converting Payments Flow to work with queues.docx’ because it is being used by another process.

System.Exception: Publishing the project has failed.

Error: The process cannot access the file ‘I:*\Dev Code\Jake Lewis\Development\Generic Payments Flowchart - V1 and V2 - Working 110917\PaymentProcess\Converting Payments Flow to work with queues.docx’ because it is being used by another process. —> System.IO.IOException: The process cannot access the file 'I:***\Dev Code\Jake Lewis\Development\Generic Payments Flowchart - V1 and V2 - Working 110917\PaymentProcess\Converting Payments Flow to work with queues.docx’ because it is being used by another process.
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 NuGet.PhysicalPackageFile.GetStream()
at NuGet.PackageBuilder.WriteFiles(Package package)
at NuGet.PackageBuilder.Save(Stream stream)
at UiPath.Project.Deploy.ProjectPackageManager.Pack(WorkflowProject project)
at UiPath.Project.ProjectManager.Publish(Int32 timeoutMS)
at UiPath.Workflow.ViewModels.MainViewModel.PackAndPush()
— End of inner exception stack trace —

Steps to reproduce: Have a word document and a uipath studio project open with orchestrator enabled.

Current Behavior: Errors out

Expected Behavior: Publishes the project

Studio/Robot/Orchestrator Version: 2016.2.6232

Last stable behavior: If word document is not open it publishes.
Last stable version: 2016.2.6232
OS Version: windows 7
Others if Relevant: (workflow, logs, .net version, service pack, etc):

The only thing I can assume is that it is trying to access word to write it’s logs.


#2

Why do you need to have the word doc open when you publish? thanks,


#3

Hey Djh,

I have word documents open all the time as part of my work. I don’t need them open but it becomes disruptive to close them all down each time i’m looking to publish.I’d be intrigued to know why studio and word interact in such a way that word would block studio’s execution as i would have thought they should be separate.


#4

Ok, understood. the problem is simply that the word document isn’t allowing access to UiPath because it thinks you are using the document and so has in effect locked it down for your use. Are you familiar with how to change the file sharing options on a word document? Shared documents allow multiple users to access, and potentially edit, documents at the same time, this may also allow UiPath to interact with the document while it is open on your desktop (though I haven’t tried it so it may be trial and error) so is maybe worth a try


#5

Hi Djh,

I think you may have misunderstood. My robot does not interact with the document in any way. It is actually a change log that I fill in every time I push the robot to orchestrator.

I’m familiar with the fact that files will be locked down if two users have them open. (shared documents tend to be a system hog so I tend to avoid them)

The issue is that studio is trying to interact with the document (may not specifically be this document) it’s more likely studio is using a default or open text editor to create/edit it’s logs and is finding conflicts in the fact that I have a document open)

Hope that helps.


#6

Hi Jake, yes my apologies I assumed the word file you had open was one which was being used by the automation. I haven’t seen this issue before im afraid


#7

Hi Djh, No problem. As I said it’s resolved by closing the word document but is something odd that’s for sure.

Thanks anyways :slight_smile:


#8

No problem, sorry I cant be of more help, @Florent_Salendres do you know if there is a workaround to this/why this is happening?


#9

@jakelewis18

Hello,

The only reason that I see which would cause this is that the document you have open is part of your project folder (location: I:*\Dev Code\Jake Lewis\Development\Generic Payments Flowchart - V1 and V2 - Working 110917\PaymentProcess\Converting Payments Flow to work with queues.docx’).

If you do not need it, just remove them from the project location.

You can access the project location by clicking here on the studio.

image

Cheers


#10

Hey,

That may very well be it I can see that excel would lock the location while publishing to stop any inadvertent changes being made. That makes sense, when I get a chance I will check this and let you know.

Thanks