horilla-opensource / horilla

Horilla is a free and open source HR software.
https://www.horilla.com/
GNU Lesser General Public License v2.1
83 stars 44 forks source link

ModuleNotFoundError: No module named 'django.utils.datetime_safe' django #133

Closed darshmashru closed 1 month ago

darshmashru commented 1 month ago

Bug Report

Description

ModuleNotFoundError: No module named 'django.utils.datetime_safe' django

Steps to Reproduce

  1. Installing Horilla using the Shell Script provided. (https://www.horilla.com/docs/installation-using-shell-script/) ./horilla_install_ubuntu.sh #for Ubuntu

  2. Connecting to Horilla on port 8000.

OR

  1. Using Docker to run Horilla (https://github.com/horilla-opensource/horilla/blob/master/docker.md) docker compose up

  2. Connecting to Horilla on port 8000.

Expected Behavior

It should open the login page for Horilla

image

Actual Behavior

It shows the message "Internal Server Error"

In the logs it shows: ModuleNotFoundError: No module named 'django.utils.datetime_safe' django

Screenshots

image

Environment

Additional Information

I think the reason this is happening is because django.utils.datetime_safe module has been removed in Django v5.0 (https://github.com/django-haystack/django-haystack/issues/1902). Django version has been set to v4.2.11 on the Release Tag (https://github.com/horilla-opensource/horilla/commit/098634caff474c998f83b11828732f554fb47c7e)

Possible Solution

You can try one of the 3 possible solutions:

  1. You can wait for the next release because it will be fixed for sure in the next release.
  2. You can manually change the requirements.txt file and change Django>-4.2 to Django==4.2.11
  3. You can use the Stable Release Tag (https://github.com/horilla-opensource/horilla/commit/098634caff474c998f83b11828732f554fb47c7e)

Labels

Bug

Priority

Medium

horilla-opensource commented 1 month ago

Hi @darshmashru , Thanks for pointing out the issue, the requirements files was overwritten from a commit and we haven't noticed it. We have updated the requirements file with changes in the Django version details. Please check.

With Regards, Team Horilla

darshmashru commented 1 month ago

Perfect, I saw the commit (https://github.com/horilla-opensource/horilla/commit/6460fd19b9d4abfe505db45517a565453f58857a) and this issue ideally should now be fixed and should work for everyone installing Horilla using the shell script provided or Docker.