Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation issues #1047

Closed
bevedeict opened this issue Oct 9, 2024 · 1 comment
Closed

Installation issues #1047

bevedeict opened this issue Oct 9, 2024 · 1 comment

Comments

@bevedeict
Copy link

Hi ,
I'm trying to do a local install of Qfield for a customer of ours to test with, and im getting issues when running
docker compose exec app python manage.py migrate as mentioned in the installation instructions

The error i'm getting is as followed:
psycopg2.errors.InvalidSchemaName: no schema has been selected to create in
LINE 1: CREATE TABLE "django_migrations" ("id" integer NOT NULL PRIM...
^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/django/db/migrations/recorder.py", line 70, in ensure_schema
editor.create_model(self.Migration)
File "/usr/local/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 451, in create_model
self.execute(sql, params or None)
File "/usr/local/lib/python3.10/site-packages/django/db/backends/postgresql/schema.py", line 45, in execute
return super().execute(sql, params)
File "/usr/local/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 201, in execute
cursor.execute(sql, params)
File "/usr/local/lib/python3.10/site-packages/django/db/backends/utils.py", line 102, in execute
return super().execute(sql, params)
File "/usr/local/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "/usr/local/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/local/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "/usr/local/lib/python3.10/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute
return self.cursor.execute(sql)
django.db.utils.ProgrammingError: no schema has been selected to create in
LINE 1: CREATE TABLE "django_migrations" ("id" integer NOT NULL PRIM...

I've contacted OpenGis, and they told me i'm missing connection settings:

After reviewing, the error prompt looks like the configuration for your connection is not specified. Make sure that in your settings.py file you have specified the credentials for the connection
And the corresponding credentials in the .env file,

As far as i can see all the info is in the .env file but it doesn't seem to do anything with it.
I've got a basic knowledge of Linux, and i'm stuck at this point.

@suricactus
Copy link
Collaborator

Somehow you are missing the public schema in your database. If you use standalone.yml I am pretty sure you will not experience this problem. This will help you to debug the problem in your database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants