The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Problem with Loop Files
Hello everybody
I'm willing to write a process whose aim is reading all csv files from a directory and perform the very same operation on them.
I have this problem with the Loop Files operator and its subprocess.
The Loop operator looks like this
Loop [Filter: '*.csv', Directory: /home/riccardo/Workspace/unrealtournament3-dmtm2010/Training Data, File Name Macro: file_name File Path Macro: file_path etc] (the directory is made of two parts....could it be a problem? I also tried to rename it to Training_Data but hadn't got any success ... )
Inside it I have put a Read CSV operator where the File Name is set to %{file_path} (and another operator just for the sake of connecting the output somewhere).
The error I get is:
Cannot create example set meta data: Could not read file 'null': /home/riccardo/file_path (No such file or directory)..
Shouldn't RapidMiner set the value at runtime for each of the CSV file in that directory?
Why is this process broken??
(Please answer me asap as I need to finish this work by today, 23:59 UTC +01:00)
I'm willing to write a process whose aim is reading all csv files from a directory and perform the very same operation on them.
I have this problem with the Loop Files operator and its subprocess.
The Loop operator looks like this
Loop [Filter: '*.csv', Directory: /home/riccardo/Workspace/unrealtournament3-dmtm2010/Training Data, File Name Macro: file_name File Path Macro: file_path etc] (the directory is made of two parts....could it be a problem? I also tried to rename it to Training_Data but hadn't got any success ... )
Inside it I have put a Read CSV operator where the File Name is set to %{file_path} (and another operator just for the sake of connecting the output somewhere).
The error I get is:
Cannot create example set meta data: Could not read file 'null': /home/riccardo/file_path (No such file or directory)..
Shouldn't RapidMiner set the value at runtime for each of the CSV file in that directory?
Why is this process broken??
(Please answer me asap as I need to finish this work by today, 23:59 UTC +01:00)
Tagged:
0
Answers
The devil is always in the detail, it was the regex '*.csv' in this case . The following logs my files..
So now you have time for a splendid dinner as well!
Ciao.
haddock, your solution is as always correct (and fast). Nevertheless I'm a bit confused. Of course the regexp "*.csv" does not express what is intended but isn't it also not well-formed. The star at the beginning is the problem; what is to be present zero or more times? Shouldn't there be some kind of MalformedRegExpException (I'm not shure of the correct name right now)?
Best regards,
chero
As I see it *.csv would choke the parrot, because, as you say, * has to follow what it can repeat, but '*.csv' ( notice the single quotes ) would not. I use RegexBuddy for all this regex stuff ( brill ), about which I understand zippo!
Ciao!
of course you are right. I missed the single quotes :-[
Best regards,
chero
I'm running into this issue in plenty of places, see thread at
http://rapid-i.com/rapidforum/index.php/topic,2304.0.html
Oddly, my processes all function, but I get plenty of "Cannot create example set meta data".
Debugging this error class since 5+ hours... Any help would be appreciated!
Christian
as I already wrote in another thread: Macros are only evaluated during run time, because they are assigned only by the execution of the respective operators. Unfortunately their value simply can't be known during execution time! Hence they can't be replaced with their values during meta data transformation and this might result in errors.
You can't solve anything without taking a look at the actual data...
Greetings,
Sebastian