Output Error Message
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, does anyone know why the first workflow run correctly but the second one produce an error message? The output tool configuration is the same.
Regards,
Ignacio
Solved! Go to Solution.
- Labels:
- Error Message
- Output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @NachoArg ,
it would help if you post the error message, but my assumption is it's because it's still writing the first output to the same workbook, which means it's in use when it tries to right the second.
Show me the error and I'll be able to help a bit more.
M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you M! Below you´ll find the error message:
Error: Output Data (4): Unable to open file for write: C:\Users\Desktop\Alteryx Pruebas\Several Files\-output.xlsx Error Opening file: C:\Users\Desktop\Alteryx Pruebas\Several Files\-output.xlsx: The process cannot access the file because it is being used by another process. (32)
If your assumptions "it´s still writing" is correct, is there any rule should I learn? I mean, it is mandatory three Tools between two separate output or something like that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yeah, that's what it is.
You have two outputs going to two sheets. Union each like for like one together and put them out on two outputs. There's no need for four.
You have two outputs going to sheet 1, and two going to sheet 2. Union the Sheet 1 outputs together, then the Sheet 2 outputs.
This should resolve the problem.
M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @NachoArg
Like @mceleavey said, the reason for the error is that the file is still open when the second tool tries to write to it. The reason your first workflow works and the second doesn't has to do with timing. The first workflow has a summarize tool before the second tool. Summarize operations tend to take a long time, depending on the number of rows in your input dataset and the operations that your performing. So the summarize tool slows down the workflow just enough so that the first write operation is complete before the second one starts.
In your second workflow, you only have a select tool on the bottom branch, which is just about the fastest tool available, since it just modifies the metadata and doesn't actually process the data in any way. In this case, your 2 output tools try to access the same file almost simultaneously and the second one fails.
There are ways to deal with this kind of concurrency. The most common one is the Block Until Done tool which waits for all the records to be processed out of the top output before sending the records out to the bottom. Puyt your block until done before the filter and then copy the filter but put the opposite condition before you second output
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Got it! Thank you Dan for your clarification 🙂
