Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Guide to Creating Your Own Connector - Handling Errors

Highlighted
6 - Meteoroid

Hi guys: 

 

I set up a batch file with a run command, and ran it. The Error message came up

 

Designer x64 The Designer x64 reported: Error running Event #1: The external program "\\XX\XX\XX\XX\XX.bat" returned an error code: 1: The specified image file did not contain a resource section. ¶ (1812)

 

Any idea?

 

Thank you 

 

Tim

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi Tim,

 

Could you let us see the flow and .bat file?

 

Best,

Daniel

Highlighted
7 - Meteor

Hope it`s ok to piggyback on the question: I`m trying to set up a .bat file to move a file after completing a workflow and I`m getting the same exact error (using Alteryx Designer). 

Any thoughts on what is wrong?

Thanks, Joanna

 

Highlighted
5 - Atom

I am having the same issue.  Wondering if the resolution was not posted because it was specific to that workflow.  Curious the best way for me to get help with this error.  Let me know.  Thanks!

Highlighted
Alteryx Partner

 

From my experience I can say:

-avoid spaces in Directory (folder names)

-target directories at your own computer (not working well with dropbox or mapped drives)

 

There are sample solutions posted on that already:

 

https://community.alteryx.com/t5/Setup-Configuration/Configure-Run-Command-tool-to-move-a-file/td-p/...

 

https://community.alteryx.com/t5/Data-Preparation-Blending/Using-Run-Command-to-Move-files/td-p/8958

 

Hope that helps!

Highlighted
5 - Atom

I'm getting the same error.

 

Error running Event #1: The external program

"C:\Users\my.name\Desktop\test.bat" returned an error code:1: The specified image file did not contain a resource section. (1812)

 

Has a workaround been found? 

 

Highlighted
7 - Meteor

Did anyone come up with a solution or workaround to this? 

 

I've got the same error message when running a bat file to move a file on workflow completion (as an event), then delete the bat file. Everything works fine, but an error is still returned. I've experimented and for me it appears that the act of deleting the bat file is what is creating this error message. 

 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi,

 

Could you perhaps share the workflow and bat script? Why do you wan't to delete the bat file afterwards. You could save it to the TEMP directory by putting "%TEMP%" in the path. Then the file will be deleted automatically.

 

Best regards,

Daniel

Highlighted
7 - Meteor

Hi Daniel, Thanks very much, I've attached the workflow.

 

Hopefully I'm not treading on the toes of this thread and may help uncover the cause of this error message more generally than just my case, even if it's in a bit of a roundabout way!

 

I'm sure there are better ways to do it but I think this is an interesting experiment nonetheless.

 

I have a folder with two sub-folders. One is called "To Load To Redshift", the other is called "Loaded To Redshift". 

 

What I'm doing is running a previous workflow which processes a series of excel files in the "to load" folder and pushes them to a database (in this case redshift). Then the workflow I have attached is run, which uses the directory tool to specify the location of the "To Load Folder", and uses a batch macro finds all excel files in this folder, then creates a Bat file in the "To Load" folder. This is run after the workflow completes, and it moves all the excel files from the "To Load" folder to the "Loaded" folder, then deletes itself. 

 

 

The error message is returned to Alteryx (even though everything completed successfully) after the bat file has run. 

 

I've done it like this as in theory it's flexible and re-usable, but as I said there are probably better ways, using %TEMP% as you suggested. 

 

If you're interested then feel free to take a look but if not it's actually not the end of the world because it's all working - just with a superfluous error message at the end. 

 

Thanks again! 

 

Sam

 

To Test: 

 

  1. Create a folder with two sub-folders called "To Load To Redshift" and "Loaded To Redshift"
  2. Put some (any) excel files in the "To Load" folder
  3. Open the workflow, ignore the file path error messages (to the bat file which doesn't yet exist)
  4. Change the directory tool to the directory of your "To Load To Redshift" folder. 
  5. Run the workflow 
  6. Check the two folders and the excel files will have moved

If in doubt please disable the event when running the first time to see the Bat file created. 

 

Hopefully makes sense, if not happy to help. 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi again, Could you perhaps also upload the macros. This is only the workflow. In particular the macro where you run the bat script

 

Best,

Daniel

Labels