TypeError 'NoneType' when using pgadmin-schema-diff
mgm1313 opened this issue · comments
Bug report
Describe the bug
When using the supabase/pgadmin-schema-diff
as described on the supabase blog, i get an error TypeError: 'NoneType' object is not iterable
.
To Reproduce
~ docker run supabase/pgadmin-schema-diff \
'postgres://postgres:[password]@[url].supabase.co:5432/postgres' \
'postgres://postgres:[password]@[url].supabase.co:5432/postgres' \
> ~/Downloads/schema-diff.sql
Starting schema diff...
Comparision started......0%
Traceback (most recent call last):
File "cli.py", line 272, in <module>
diff_result = message + 'BEGIN;\n\n' + '\n'.join(x.get('diff_ddl') for x in response_data['data'] if x.get('status') != 'Identical' and in_db_objects(x.get('type'), args)) + '\n\nEND;'
TypeError: 'NoneType' object is not iterable
Additional context
I can provide a schema-only dump of the source database in a more private setting, the target database is a freshly set-up Supabase project.
I have the same error:
Starting schema diff...
Comparision started......0%
Traceback (most recent call last):
File "cli.py", line 418, in <module>
display_diff(
File "cli.py", line 347, in display_diff
diff_result = "\n".join(
TypeError: 'NoneType' object is not iterable
Hmm, but error message is different, maybe it is different error?
To investigate it I tried to run diff
in pgadmin GUI. It showed error that major version of postgres is not the same.
So I recreated local postgres as version 13 (before it was 12) so it is the same as db hosted by supabase. Then in GUI diff
was working so I tried CLI and it is also working 😄
@mgm1313 I think you may try my approach, possibly you have the same cause.