R
Railwayβ€’13mo ago
MIGHTY_MIDHUN

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

I'm using django with mutlitenants using the package django-tenants==3.5.0 When i deployed the app to railway im getting the error. AttributeError: 'DatabaseWrapper' object has no attribute 'set_schema' I have also updated the railway environment variables and set my engine to ... ENGINE=django_tenants.postgresql_backend But I'm not able to fix the error
31 Replies
Percy
Percyβ€’13mo ago
Project ID: fd0bd18d-392d-4b0d-af5c-395356468583
MIGHTY_MIDHUN
MIGHTY_MIDHUNβ€’13mo ago
fd0bd18d-392d-4b0d-af5c-395356468583
Brody
Brodyβ€’13mo ago
what version of python are you using locally and what version is railway using?
MIGHTY_MIDHUN
MIGHTY_MIDHUNβ€’13mo ago
its python 3.10 in local i dont know if there is any specfic python version in railway
Brody
Brodyβ€’13mo ago
of course there is lol check the build table at the top of the build logs
MIGHTY_MIDHUN
MIGHTY_MIDHUNβ€’13mo ago
No description
MIGHTY_MIDHUN
MIGHTY_MIDHUNβ€’13mo ago
its python 3.8
Brody
Brodyβ€’13mo ago
MIGHTY_MIDHUN
MIGHTY_MIDHUNβ€’13mo ago
{ "$schema": "https://railway.app/railway.schema.json", "build": { "builder": "NIXPACKS", "nixpacksPlan": { "providers": [ "python" ], "phases": { "setup": { "nixPkgs": [ "...", "nodejs" ] } } }, "buildCommand": "npm ci" }, "deploy": { "startCommand": "pip install -r requirements.txt && python manage.py migrate && python manage.py collectstatic --noinput && gunicorn hospital_site.wsgi", "restartPolicyType": "ON_FAILURE", "restartPolicyMaxRetries": 10 } } this is my railway.json so how to modify it
Brody
Brodyβ€’13mo ago
please read this section of the docs https://nixpacks.com/docs/providers/python#setup
MIGHTY_MIDHUN
MIGHTY_MIDHUNβ€’13mo ago
NIXPACKS_PYTHON_VERSION 3.10 i just need to add this environment variable ?
MIGHTY_MIDHUN
MIGHTY_MIDHUNβ€’13mo ago
No description
Brody
Brodyβ€’13mo ago
yep if that's the method you'd like to use
MIGHTY_MIDHUN
MIGHTY_MIDHUNβ€’13mo ago
ok let me see this if this would fix the issue hopefully πŸ™‚ im still getting the issue, I think the problem is not related to the python version. Could it be something else
Brody
Brodyβ€’13mo ago
are you using alll the same dependency versions locally and on railway?
Want results from more Discord servers?
Add your server