Skip to content

Enhance Experiment Logs to Include Detailed ImportError Information #271

Open
@rkjakeer

Description

@rkjakeer

Is your feature request related to a problem? Please describe.
I am working on a new custom extension and I have encountered occasional errors, such as the one shown below while running experiments with it. This error seems to occur during the custom module import process. Although the module is installed using pip install, we lack detailed information about what caused the import to fail. Running the experiment in verbose mode did not provide additional insights either.

ERROR] [run:188] could not find Python module '<custom-extension>' in activity '<activity-name>'

Describe the solution you'd like
To enhance troubleshooting, it would be beneficial if the experiment log also included details about the error. Therefore, I propose logging the ImportError in this section that currently captures the error. Currently, the log output lacks information regarding the root cause of the import errors.

Describe alternatives you've considered
I attempted using sys.exc_info() in the specified section, which provided the following error message, aiding in issue resolution:

ImportError (<class 'ImportError'>, ImportError("cannot import name 'setup_logger' from 'logzero' (unknown location)"), <traceback object at 0x7fdaef5584c0>)

Additional context
The custom extension was attempting to import setup_logger from logzero and required correction to address the root cause of the issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions