Skip to content

change the error message in runner #91

@basnijholt

Description

@basnijholt

(original issue on GitLab)

opened by Bas Nijholt (@basnijholt) at 2018-02-22T15:23:30.787Z

In line 155 in runner.py we can't rely on __name__ because a functools.partial object has no attribute __name__.

~/Work/induced_gap_B_field/adaptive/runner.py in _run()
    353                     except Exception as e:
    354                         raise RuntimeError(
--> 355                             'An error occured while evaluating '
    356                             f'"{self.learner.function.__name__}({x})". '
    357                             'See the top traceback for details.'

AttributeError: 'functools.partial' object has no attribute '__name__'

@jbweston

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