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

i am unable to install horilla in ubuntu desktop 22.04 #183

Closed
rrahulsinghh3 opened this issue May 10, 2024 · 14 comments
Closed

i am unable to install horilla in ubuntu desktop 22.04 #183

rrahulsinghh3 opened this issue May 10, 2024 · 14 comments

Comments

@rrahulsinghh3
Copy link

I am encountering an issue while trying to install Horilla on my Ubuntu Desktop 22.04 system. During the installation process, I encountered the following error:****

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

Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/apscheduler/executors/base.py", line 125, in run_job
retval = job.func(*job.args, **job.kwargs)
File "/home/itadmin/Documents/test/horilla/leave/scheduler.py", line 17, in leave_reset
for leave_type in leave_types:
File "/usr/local/lib/python3.10/dist-packages/django/db/models/query.py", line 398, in iter
self._fetch_all()
File "/usr/local/lib/python3.10/dist-packages/django/db/models/query.py", line 1881, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/usr/local/lib/python3.10/dist-packages/django/db/models/query.py", line 91, in iter
results = compiler.execute_sql(
File "/usr/local/lib/python3.10/dist-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 102, in execute
return super().execute(sql, params)
File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "/usr/local/lib/python3.10/dist-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/dist-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.10/dist-packages/django/db/backends/sqlite3/base.py", line 328, in execute
return super().execute(query, params)
django.db.utils.OperationalError: no such column: leave_leavetype.is_compensatory_leave

It appears that the installation process is failing due to an operational error related to a missing column (is_compensatory_leave) in the leave_leavetype table.

Steps to Reproduce:

Attempt to install Horilla on Ubuntu Desktop 22.04.
Follow the installation instructions provided.
Encounter the error during the installation process.

Expected Behavior:
The installation process should complete successfully without encountering any errors.

i have tired all the method you have provide including script but still unable to install. Please provide guidance on how to resolve this issue so that I can successfully install Horilla on my system. Thank you!

Rahul

@rrahulsinghh3
Copy link
Author

Screenshot 2024-05-10 at 21-01-18 OperationalError at _

@horilla-opensource
Copy link
Owner

Hi @rrahulsinghh3 ,
Are you testing the installation using the test database or a fresh database?

With Regards,
Team Horilla

@rrahulsinghh3
Copy link
Author

test database

@rrahulsinghh3
Copy link
Author

"I am using a script for installation, and once the process of creating a user is completed and the server startup is finished, I visit the link. However, upon logging in, I encounter this error. Sometimes, even during the user creation process, I face this error."

@horilla-opensource
Copy link
Owner

Ho @rrahulsinghh3 ,
Sorry for the inconvenience caused.
We have updated the test database in the repo.
Please check with the latest commit and run the script again. This should fix the error.

With Regards,
Team Horilla

@rrahulsinghh3
Copy link
Author

Thank you, horilla installed successfully

@horilla-opensource
Copy link
Owner

Glad to hear that.
Can we close this issue then?

With Regards,
Team Horilla

@rrahulsinghh3
Copy link
Author

Yes and thank you for the support.

@horilla-opensource
Copy link
Owner

We are very glad to help you.
Do let us know if you face any issues with Horilla.

With Regards,
Team Horilla

@rrahulsinghh3
Copy link
Author

Hi can i use fresh database?

@horilla-opensource
Copy link
Owner

Hi @rrahulsinghh3 ,
Either you can delete the current test database from the project directory and run the migrate command to have a fresh new database or else you can change the database name inside the settings.py to a new name of you wish and proceed with the migrate command.
Once migrate command is done, create a Horilla admin user using the createhorillauser command.
Follow the steps in the docs below.

To create the horilla user:
python3 manage.py createhorillauser

With Regards,
Team Horilla

@rrahulsinghh3
Copy link
Author

Thank you, and if I need more help, I will connect with you. Your support is greatly appreciated.

@horilla-opensource
Copy link
Owner

Sure.
Do let us know when you have an issue.

With Regards,
Team Horilla

@rrahulsinghh3
Copy link
Author

When a new user is created, they are automatically granted access to view the entire employee list in the employee section. Is there any way to restrict access to only their profile? Additionally, when I attempt to delete a user, I receive an error. Please advise.

error (Environment:

Request Method: POST
Request URL: http://192.168.0.163:8000/employee/employee-delete/4/?view=card

Django Version: 4.2.13
Python Version: 3.10.12
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'notifications',
'mathfilters',
'corsheaders',
'simple_history',
'django_filters',
'base',
'recruitment',
'employee',
'leave',
'pms',
'onboarding',
'asset',
'attendance',
'payroll',
'widget_tweaks',
'django_apscheduler',
'horilla_audit',
'horilla_widgets',
'horilla_crumbs',
'horilla_documents',
'haystack',
'helpdesk',
'offboarding']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'corsheaders.middleware.CorsMiddleware',
'simple_history.middleware.HistoryRequestMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'base.middleware.CompanyMiddleware',
'base.thread_local_middleware.ThreadLocalMiddleware']

Traceback (most recent call last):
File "/home/itadmin/Downloads/horilla/horilla/decorators.py", line 191, in wrapped_view
func = view_func(request, args, *kwargs)
File "/home/itadmin/Downloads/horilla/horilla/decorators.py", line 40, in _function
return function(request, args, *kwargs)
File "/usr/local/lib/python3.10/dist-packages/django/views/decorators/http.py", line 43, in inner
return func(request, args, *kwargs)
File "/home/itadmin/Downloads/horilla/employee/views.py", line 1906, in employee_delete
if Contract.objects.get(employee_id=obj_id) is not None:
File "/usr/local/lib/python3.10/dist-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(args, *kwargs)
File "/usr/local/lib/python3.10/dist-packages/django/db/models/query.py", line 637, in get
raise self.model.DoesNotExist(

During handling of the above exception (Contract matching query does not exist.), another exception occurred:
File "/usr/local/lib/python3.10/dist-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/usr/local/lib/python3.10/dist-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, callback_args, *callback_kwargs)
File "/home/itadmin/Downloads/horilla/horilla/decorators.py", line 196, in wrapped_view
return view_func(request, args, *kwargs)
File "/home/itadmin/Downloads/horilla/horilla/decorators.py", line 40, in _function
return function(request, args, *kwargs)
File "/usr/local/lib/python3.10/dist-packages/django/views/decorators/http.py", line 43, in inner
return func(request, args, *kwargs)
File "/home/itadmin/Downloads/horilla/employee/views.py", line 1906, in employee_delete
if Contract.objects.get(employee_id=obj_id) is not None:
File "/usr/local/lib/python3.10/dist-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(args, *kwargs)
File "/usr/local/lib/python3.10/dist-packages/django/db/models/query.py", line 637, in get
raise self.model.DoesNotExist(

Exception Type: DoesNotExist at /employee/employee-delete/4/
Exception Value: Contract matching query does not exist.)

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