Skip to content

Import Failures #291

@dcompiled

Description

@dcompiled

The code in strategies/python.py masks errors that occur during the import process. I spent several hours looking into why imports were not working on a remotely managed box and it boiled down to problems with a settings file failing to import.

    @staticmethod
    def is_valid_file(file_name):
        try:
            importlib.import_module(file_name)
            return True
        except (ImportError, TypeError):
            return False

Add some logging with the exception to help pinpoint issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions