The Altair Community is migrating to a new platform to provide a better experience for you. The RapidMiner Community will merge with the Altair Community at the same time. In preparation for the migration, both communities are on read-only mode from July 15th - July 24th, 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.

Issue with folder creation (Operator.getParameterAsFile)

colocolo Member Posts: 236 Maven
edited November 2018 in Help

I was just wondering, why the web crawler doesn't automatically generate folders required for the specified output location.

CrawlerOperator calls the method getParameterAsFile(String key, boolean createMissingDirectories) with the second parameter set to true. Having a look at the method from class Operator revealed the problem:

public getParameterAsFile(String key, boolean createMissingDirectories) throws UndefinedParameterError {
        String fileName = getParameter(key);
        if (process != null) {
            File result = process.resolveFileName(fileName);
            if (createMissingDirectories) {
                if (result.isDirectory()) {
                } else {
                    File parent = result.getParentFile();
                    if (parent != null)
            return result;
Since the directory is not existing at the time where this code starts being executed, result.isDirectory() will always return false (this is at least the case on my Windows machine). As soon as the directory exists, it is correctly recognized as directory, but that doesn't help much in case where I want it to be created.

I will solve this with a temporary workaround for now. But if you can confirm the issue, you probably might want to fix this.

Best regards


  • Options
    Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,996 RM Engineering

    I'm afraid I have to ask you again to file a bug report on the issue..

  • Options
    colocolo Member Posts: 236 Maven
    Hi Marco,

    last time your answer was much more appreciated ;) I created all the bugs you asked for.

    I'm wondering about my chance of becoming "Bug Filer of the Week"... there are four up to now, don't know if this will be enough :D

Sign In or Register to comment.