Skip to content

Difficulties with generation using unraid docker #665

@dscisci

Description

@dscisci

Hey there! I have been struggling with getting filemonitor to work properly via Unraid docker (Unraid 7.2.3), and now after spending hours trying various things, I'm coming here to see if there may be an underlying issue.

Getting this installed as a script was fairly straightforward (for those of you using Unraid - this is pretty simple using user scripts plugin). What confounded me for awhile however, is that the docker mount binding in the filemonitor_config.py doesn't get picked up properly - unsure why. I got around this by creating a symlink from my host directory to the docker dir, which is created at the start of the script. While not ideal, it seems to work.

Once everything was configured, when the scheduled tasks kick off, the only one that worked properly is simple scanning. Files get added to the stashdb both by the monitoring service of course, and when the scheduler kicks off. However, 'generate' fails for me. I've shortened the output of the log, but here is the gist:

eGRAPHQL_VALIDATION_FAILED:['variable', 'input'] cannot be null StdErr: [LN:1050] ERR: Exception while running FileMonitor. runType='CommandLineStartLibMonitor'; Error: 'NoneType' object has no attribute 'keys'

The graphQL query seems to rejected by stash due to the null variables. Filemonitor crashes after this, and then restarts as I have the process restart if it does. It continues to do this each time a generate task is kicked off.

I 'fixed' it by specifying generation if the metadata is null:

def metadata_generate(self, flags=None): query = "mutation MetadataGenerate($input:GenerateMetadataInput!) { metadataGenerate(input: $input) }" if flags and isinstance(flags, dict): generate_metadata_input = flags else: defaults = self.get_configuration_defaults("generate { ...GenerateMetadataOptions }") or {} generate_metadata_input = defaults.get("generate") if isinstance(defaults, dict) else {} # NEVER allow null input if not generate_metadata_input: generate_metadata_input = {} result = self.call_GQL(query, {"input": generate_metadata_input}) return result.get("metadataGenerate") if isinstance(result, dict) else result

This at least stopped FM from crashing, but no generation actually happens ( I do see the task hitting stash in the task monitor for a second)

Manually clicking scan within stash works perfectly fine. Am I missing something obvious here to get this working?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions