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

Cannot Install horilla on Ubuntu 24 #448

Open
Najeeb-joya opened this issue Jan 1, 2025 · 5 comments
Open

Cannot Install horilla on Ubuntu 24 #448

Najeeb-joya opened this issue Jan 1, 2025 · 5 comments

Comments

@Najeeb-joya
Copy link

I cloned horilla and I wanted to install it on ubuntu 24. My database is postgres, at the make migration step I get the following error.

Traceback (most recent call last):
File "/usr/src/horilla/horilla/myvenv/lib/python3.12/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.errors.UndefinedTable: relation "base_company" does not exist
LINE 1: ...."date_format", "base_company"."time_format" FROM "base_comp...

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

Traceback (most recent call last):
File "/usr/src/horilla/horilla/manage.py", line 22, in
main()
File "/usr/src/horilla/horilla/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/usr/src/horilla/horilla/myvenv/lib/python3.12/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
utility.execute()
File "/usr/src/horilla/horilla/myvenv/lib/python3.12/site-packages/django/core/management/init.py", line 416, in execute
django.setup()
File "/usr/src/horilla/horilla/myvenv/lib/python3.12/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/src/horilla/horilla/myvenv/lib/python3.12/site-packages/django/apps/registry.py", line 124, in populate
app_config.ready()
File "/usr/src/horilla/horilla/attendance/apps.py", line 35, in ready
self.create_enable_disable_check_in()
File "/usr/src/horilla/horilla/attendance/apps.py", line 47, in create_enable_disable_check_in
for company in companies:
File "/usr/src/horilla/horilla/myvenv/lib/python3.12/site-packages/django/db/models/query.py", line 398, in iter
self._fetch_all()
File "/usr/src/horilla/horilla/myvenv/lib/python3.12/site-packages/django/db/models/query.py", line 1881, in _fetch_all
self._result_cache = list(self._iterable_class(self))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/horilla/horilla/myvenv/lib/python3.12/site-packages/django/db/models/query.py", line 91, in iter
results = compiler.execute_sql(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/horilla/horilla/myvenv/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
cursor.execute(sql, params)
horilla

@horilla-opensource
Copy link
Owner

Hi @Najeeb-joya ,

Did you run the migrations command?

python3 manage.py makemigrations
python3 manage.py migrate

With Regards,
Team Horilla

@Najeeb-joya
Copy link
Author

Najeeb-joya commented Jan 1, 2025

Hi,

yes, I have cloned the horilla, created a Python virtual environment, installed requirements from requirements.txt then installed Postgres and created my database everything is good till now but when I type python3 manage.py makemigrations I get the error

horilla

@horilla-opensource
Copy link
Owner

Hi @Najeeb-joya ,

Can you check inside the migrations folder of the apps if there is already anu migrations file already present?

With Regards,
Team Horilla

@Najeeb-joya
Copy link
Author

No there is not any file inside asset/migration

@horilla-opensource
Copy link
Owner

Hi @Najeeb-joya,

We found the issue in the attendance app where the apps.ready method was causing errors by attempting to query the Company table during initialization. This happened because the database tables weren’t fully migrated at that stage.

The issue has been fixed. Please pull the latest code from the master branch and ensure everything is up to date.

Let us know if you face any further issues

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