diff --git a/CHANGELOG.md b/CHANGELOG.md index 732a09ada..f8d60ea69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Releases prior to 7.0 has been removed from this file to declutter search result ### Fixed +- cli: Fixed help message on `CallbackError` reporting `batch` handler instead of actual one. - substrate.subsquid: Fixed parsing nested structures in response. ### Changed diff --git a/src/dipdup/cli.py b/src/dipdup/cli.py index bfa3ab575..d0906c24c 100644 --- a/src/dipdup/cli.py +++ b/src/dipdup/cli.py @@ -147,8 +147,8 @@ def _print() -> None: tb = traceback.extract_tb(error.__traceback__) for frame in tb: if frame.name == 'fire_handler': - module = next(f.filename for f in tb if '/handlers/' in f.filename or '/hooks/' in f.filename) - echo(CallbackError(module=Path(module).stem, exc=error).help(), err=True) + modules = tuple(f.filename for f in tb if '/handlers/' in f.filename or '/hooks/' in f.filename) + echo(CallbackError(module=Path(modules[-1]).stem, exc=error).help(), err=True) break else: echo(Error.default_help(), err=True)