AttributeError: 'DatabaseWrapper' object has no attribute 'set_schema'

See original GitHub issue

Hello. I followed what was stated in the installation docs but have come across this:

File "/Users/user/virtualenvs/hrmod/lib/python2.7/site-packages/django/db/__init__.py", line 33, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
AttributeError: 'DatabaseWrapper' object has no attribute 'set_schema'

I have set the db engine as well. 'ENGINE': 'tenant_schemas.postgresql_backend',

I am running on django 1.11. What could possibly be the problem? Thank you.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

4reactions
dstaublecommented, Mar 7, 2018

For anyone receiving this error: My solution was finding a leftover DATABASES/ENGINE assignment pointing to the standard PostgreSQL backend in a separate settings.py file that was being imported (develop vs production). Once I removed the second DATABASES definition, the error was gone.

0reactions
minu93commented, Nov 2, 2021

I’ve the same error, does somebody has a solution for that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'DatabaseWrapper' object has no attribute ' ...
I am using Django+tenant_schemas, and my local version of my app works fine. However, when I try to push it to staging (Heroku+Docker),...
Read more >
AttributeError: 'DatabaseWrapper' object has no attribute ' ...
This error is thrown when you are trying to use the sqlite backend with the pgsql wrapper (or mysql). You should go through...
Read more >
'db.backends.dummy.base.DatabaseWrapper' object has ...
I am getting a AttributeError: 'DatabaseWrapper' object has no attribute 'Database' exception, while trying to setup/use py.test with Django.
Read more >
Python – AttributeError: 'DatabaseWrapper' object has no ...
Python – AttributeError: 'DatabaseWrapper' object has no attribute 'Database'. djangopython. Version numbers are Django 1.6, Python 3.3.2 and Mac OS X 10.9.
Read more >
'DatabaseWrapper' object has no attribute 'set_schema'
AttributeError : 'DatabaseWrapper' object has no attribute 'set_schema' ... I followed what was stated in the installation docs but have come ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found