Supabase DB connection error issubclass() arg 2 must be a class or tuple of classes

I keep getting the following error trying to hook up the DB to the Supabase postgresSQL db. I have tried both the Supabase and postgresSQL connections. This info has connected to all the other tools I have tried so its a bug.

This is the error:
issubclass() arg 2 must be a class or tuple of classes

Messaged support 2 days ago and have not gotten any fixes. Anyone run into this before?

Hi, thank you for the request, someone from our tech support will look into this soon and get back to you!

Any update here? Seems like its a python error when trying to parse the postgresSQL DB

Hey @Coop could you say approximate time you got last this error? and which Region are you using during connection?

This error is somehow connected with your data structure, so I need to check logs for your particular connection

I just tried it right now and got it again trying to connect to ( 8:07 PM Tuesday, October 18, 2022 UTC)
Integration with data source failed
issubclass() arg 2 must be a class or tuple of classes

I also got this error when trying a few minutes ago
Integration with data source failed
(psycopg2.OperationalError) FATAL: remaining connection slots are reserved for non-replication superuser connections (Background on this error at:

Could it be a permissions issue with Select * ?

Unfortunately issue happens on 3rd party library side which we are using (open source sqlalchemy), the exception is thrown when calling _relationships_for_fks and referred class is somehow not “a class or tuple of classes”

To inspect it more deeply we need to connect from our side manually to reproduce it in runtime. It could be the problem in 3rd party library, but maybe we can fix it or disable some table which causing this issue.

@Coop have you joined our Slack? I can contact you here directly to resolve this issue

For anyone using Supabase or PostgresSQL it:
I just deleted the tables with foreign keys relating to each other and it fixed this error. might be helpful to add some error text to show that it struggles with foreign key relations while copying.

So the case was with tables relating each other?
We will check this use case, but normally Jet Admin should work with such foreign keys.

Yeah, I don’t know why but it worked after deleting the tables with multiple foreign keys