#3397·atlas

[Bug?] error calling MarshalHCL when trying to inspect schema

Author: scoquelinCreated Feb 20, 2025Updated Sep 29, 2026

I'm on Windows and trying to inspect a Postgres schema using :

.\atlas.exe schema inspect -u "postgres://babelfish_user:<password>@localhost:5432/babelfish_db?search_path=dbo&sslmode=disable"

and I get this error ⚠ :

Error: template: inspect:1:4: executing "inspect" at <$.MarshalHCL>: error calling MarshalHCL: must not call ListVal with empty slice

Also tried :

.\atlas.exe schema inspect -u "postgres://babelfish_user:<password>@localhost:5432/babelfish_db?sslmode=disable" -s dbo

and get the same error.

However, when I request SQL or JSON format using respectively :

.\atlas.exe schema inspect -u "postgres://babelfish_user:<password>@localhost:5432/babelfish_db?search_path=dbo&sslmode=disable" --format "{{ sql . }}" > script.sql or .\atlas.exe schema inspect -u "postgres://babelfish_user:<password>@localhost:5432/babelfish_db?search_path=dbo&sslmode=disable" --format "{{ json . }}" > script.json it works fine!

Any idea what could be wrong with the HCL generation? Thanks!

.\atlas.exe version
atlas version v0.31.1-2f66f82-canary
https://github.com/ariga/atlas/releases/latest