Skip to main content

Hi, I came across the following issue: using a directory and path reader (filtering for files only) and supplying an empty folder works fine (it doesn't produce any files, but that's just fine). However, say I want to skip any processing from this reader, as an innocent user I supply the Windows nul: device. Now my workspace crashes, how is that? Of course, there are a lot of ways around this problem, but wouldn't it be nice if the directory and path reader behaves in the same way like, say, the Windows dir command?

To answer your question, I'd say "yes it would". But that doesn't help you. It's probably better to submit a support case to Safe. :)

 

 


To answer your question, I'd say "yes it would". But that doesn't help you. It's probably better to submit a support case to Safe. :)

 

 

Or maybe post it as an idea, so we can vote for it.

Does sound like a bug. I'll ask the team to file it.


Does sound like a bug. I'll ask the team to file it.

@daleatsafe @sander_s thanks, I'll submit a support case.

Does sound like a bug. I'll ask the team to file it.

case
ID is C127744

 

 


@helmoet I'm trying to reproduce this issue, but I'm not entirely sure how you supplied the Windows NUL: device. Currently, the PATH reader takes any way I try to input the NUL: device and reads it as part of the path for the dataset, and I'm not sure how to convince the reader to accept the NUL: device. How did you supply the NUL: device?


Hi @rileybecker  If you want to reproduce, simply place the reader (e.g., take the folder c:\temp) and connect it to a logger, in a new workspace. If you run the workspace it will do just fine. If you prompt and run (SourceDataset_PATH will be published automatically), and supply the value NUL: the following error occurs: 

Trying to find a DYNAMIC plugin for reader named `PATH' Loaded module 'PATH' from file 'C:\apps\FME\plugins/PATH.dll' FME API version of module 'PATH' matches current internal version (3.8 20151127) Opening the PATH Reader on folder 'nul:' Using Glob Pattern '*' Allowed Path Type set to 'ANY' Retrieve file properties 'false' The source dataset must be a folder not a file. The dataset specified was 'nul:' A fatal error has occurred. Check the logfile above for details FME Session Duration: 0.1 seconds. (CPU: 0.1s user, 0.0s system) END - ProcessID: 12096, peak process memory usage: 35988 kB, current process memory usage: 35988 kB


It looks like we won't take any action on this issue.

The thinking is that technically Windows NUL: is a file that isn't ever written to. Using it as an output makes sense, because it's just routing output to a file that will never contain anything.

However, when reading from it using the PATH reader, FME recognizes this as a file and produces the error "The source dataset must be a folder not a file."

Since NUL: is technically a file this is correct behaviour.

If you just want to skip this, you can set the "Ignore Failed Readers" option in "Workspace Parameters" and it should be logged as a problem, but FME will carry on with the translation.

Hope this helps to clarify the situation.


Hi @Mark2AtSafe, Thanks for the response. I am not sure whether NUL: is a file. The semicolon : tells me it is a device, like c:\\ on the computer, but, hey, those were the old days back when we were using DOS and CP/M. And some scripting uses the phrase "type nul: > file.txt" to make sure an (empty) file is created, so it's meant to be readable as well (however never yielding any data except EOF, which indeed makes it a file in that case). However, if the Ignore Failed Readers option is preventing the crash I'll use that.


Reply