Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

TypeError 'NoneType' when using pgadmin-schema-diff #3

Open
mgm1313 opened this issue Aug 12, 2021 · 2 comments
Open

TypeError 'NoneType' when using pgadmin-schema-diff #3

mgm1313 opened this issue Aug 12, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@mgm1313
Copy link

mgm1313 commented Aug 12, 2021

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.

@mgm1313 mgm1313 added the bug Something isn't working label Aug 12, 2021
@karolzlot
Copy link

karolzlot commented Oct 17, 2021

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?

@karolzlot
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants