Hi,
I've been trying to figure this one out for a few hours to no avail.
I set up a macro to check if a file is locked, leveraging the Run Command tool and a batch script.
This works beautifully when I run this macro from my machine, since I have write access to the working directory.
But when I try to run this same macro from the server (i.e. I call this macro from a workflow that is saved into our company gallery and is run from that server machine), the Run Command throws errors (generally "1"), which suggest that one or more of the files can't be created or read.
When I checked what the working directory is for the server machine, I see that it is a sub-folder under ProgramData/Alteryx which I apparently am unable to write to or read from.
So then I thought that I could specify a distinct network directory that I know the server box has access to. And while this works fine for the Write Source and Read Results sections, I am unable to use a UNC path in my command line argument.
So my question is: how can I set up this macro so that it can either a) always use a relative path that the machine running the workflow actually has write access to, or b) use a defined network path without running into the UNC issue?
Solved! Go to Solution.
@Raghu_s Just got back from vacation and saw your message. In case you haven't figure it out, I would make 2 changes. If your run command tool really doesn't have any incoming connections, then you'll want to delete that file in the top box ("write source"). For your command arguments, I would try putting that inside double quotes since your folder path appears to have a space. Here are some pictures for a working example on my end:
@patrick_digan hey thanks! I was actually able to run the WF successfully in a day after my post. The bug was that Alteryx's version of python miniconda is not able to pick files form different folder location.Be it local drive where I have my workflows or a shared drive. It can only pick codes when saved at desktop. The error code I get is 2. Upon investigation I learnt from a thread that it works only this way. For now, am testing the codes and expanding the codes to do more of what my projects require. But at a deployment level am not sure how to host this in a server where we have to organize the codes.
Also am able to call only the python program that's comes as part of the alteryx module installed in bin, not as the one you are calling externally from your win installation.
any thoughts?
@Raghu_s I've attached a working example from my machine. You would obviously want to change the command, command arguments, and Read Results to point to files on your machine.
Hi, I have more or less the same problem, but your solution didn't work for me.
I have a Batch Macro that calls the Run Command tool and that Batch Macro is called from a Standard Macro that checks if the Batch Macro should be called or not. The standard macro is then called by the workflow.
If I run the Batch Macro that has the "Run Command" tool directly the file Alteryx_FileMoverOutput.txt gets created and read. The same happens if I run the Standard macro. But when I run the workflow, I get the error message that the Run Command tool didn't find the file Alteryx_FileMoverOutput.txt and I checked and it did indeed not get created in that location:
FileMoveIfInputExists (282) FileMover (19): Record #1: Tool #4: File not found "C:\ProgramData\Alteryx\Engine\Engine_364_f1ed820b022e40bbbcb15c962ff468b1_\Alteryx_FileMoverOutput.txt"
Any idea why?
Thanks
Peter
I figured out what the problem is. The IF statement didn't use the output if the file existed - only if it didn't exist.