Giter Site home page Giter Site logo

Issue with apply_fixtures about chatfaq HOT 5 CLOSED

17lxve avatar 17lxve commented on July 19, 2024
Issue with apply_fixtures

from chatfaq.

Comments (5)

Hectruendo avatar Hectruendo commented on July 19, 2024

Hi @17lxve,

We recently updated the RAGConfig model and forgot to update the corresponding fixture. The field disabled was renamed to enabled. To fix the issue, simply replace "disabled": false with "enabled": true in the fixture.

We will be making a significant update to the master branch soon, which will include this fix along with other architectural improvements.

from chatfaq.

Hectruendo avatar Hectruendo commented on July 19, 2024

Hello again @17lxve,

I wanted to inform you that we've recently pushed significant updates to the master branch, which include the fix for the issue you encountered as well as several architectural improvements. Additionally, we have updated the official documentation to reflect these changes.

We recommend pulling the latest changes from the master branch and following the updated installation guide in the documentation to set up ChatFAQ. You can find the updated guide here: ChatFAQ Installation Guide.

from chatfaq.

17lxve avatar 17lxve commented on July 19, 2024

Sorry for the late reply, i couldn't access my VPS for a moment and wanted to try before replying

I still get this error:
Traceback (most recent call last):
File "/.venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedTable: relation "auth_group" does not exist
LINE 1: UPDATE "auth_group" SET "name" = 'RPC' WHERE "auth_group"."i...
^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "//manage.py", line 21, in
main()
File "//manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/.venv/lib/python3.10/site-packages/django/core/management/init.py", line 446, in execute_from_command_line
utility.execute()
File "/.venv/lib/python3.10/site-packages/django/core/management/init.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/.venv/lib/python3.10/site-packages/django/core/management/base.py", line 402, in run_from_argv
self.execute(*args, **cmd_options)
File "/.venv/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute
output = self.handle(*args, **options)
File "/.venv/lib/python3.10/site-packages/django/core/management/commands/loaddata.py", line 102, in handle
self.loaddata(fixture_labels)
File "/.venv/lib/python3.10/site-packages/django/core/management/commands/loaddata.py", line 163, in loaddata
self.load_label(fixture_label)
File "/.venv/lib/python3.10/site-packages/django/core/management/commands/loaddata.py", line 253, in load_label
if self.save_obj(obj):
File "/.venv/lib/python3.10/site-packages/django/core/management/commands/loaddata.py", line 209, in save_obj
obj.save(using=self.using)
File "/.venv/lib/python3.10/site-packages/django/core/serializers/base.py", line 288, in save
models.Model.save_base(self.object, using=using, raw=True, **kwargs)
File "/.venv/lib/python3.10/site-packages/django/db/models/base.py", line 863, in save_base
updated = self._save_table(
File "/.venv/lib/python3.10/site-packages/django/db/models/base.py", line 976, in _save_table
updated = self._do_update(
File "/.venv/lib/python3.10/site-packages/django/db/models/base.py", line 1040, in _do_update
return filtered._update(values) > 0
File "/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 1216, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/.venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1822, in execute_sql
cursor = super().execute_sql(result_type)
File "/.venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1398, in execute_sql
cursor.execute(sql, params)
File "/.venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 102, in execute
return super().execute(sql, params)
File "/.venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "/.venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/.venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "/.venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/.venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: Problem installing fixture '/back/apps/people/fixtures/initial.json': Could not load auth.Group(pk=1): relation "auth_group" does not exist
LINE 1: UPDATE "auth_group" SET "name" = 'RPC' WHERE "auth_group"."i...

Meanwhile:

                            List of relations

Schema | Name | Type | Owner
--------+------------------------------------------------------+----------+---------
public | auth_group | table | chatfaq
public | auth_group_id_seq | sequence | chatfaq

I am still trying, and will notify you if i find a solution

from chatfaq.

Hectruendo avatar Hectruendo commented on July 19, 2024

Hi @17lxve,

Thanks for reaching out!

Have you followed the database setup steps as outlined in our documentation?

From the details you've provided, it appears that the Django server is unable to find the tables in the database, despite them existing according to your list of relations.

One possible issue might be that Django is connecting to a different PostgreSQL instance than expected. This could occur if you have multiple PostgreSQL instances running, either outside the Docker container or within another Docker context.

I encountered a similar issue before, and it was related to the exact scenario I mentioned.

Please keep me posted with any further progress, and I'll be happy to assist!

from chatfaq.

17lxve avatar 17lxve commented on July 19, 2024

Alright, i will try and restart on a clean VM, and update you by tomorrow.
Thank you very much !

from chatfaq.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.