Open borishinzer opened 3 months ago
Hi @borishinzer ,
Please install django-environ python package using : pip3 install django-environ
With Regards, Team Horilla
Did already, but this leads to more errors:
Traceback (most recent call last):
File "/opt/horilla/horilla/manage.py", line 22, in <module>
main()
File "/opt/horilla/horilla/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/__init__.py", line 382, in execute
settings.INSTALLED_APPS
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/conf/__init__.py", line 102, in __getattr__
self._setup(name)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/conf/__init__.py", line 89, in _setup
self._wrapped = Settings(settings_module)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/conf/__init__.py", line 217, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/opt/horilla/horilla/horilla/__init__.py", line 5, in <module>
from horilla import (
File "/opt/horilla/horilla/horilla/haystack_configuration.py", line 3, in <module>
from horilla import settings
File "/opt/horilla/horilla/horilla/settings.py", line 17, in <module>
import environ
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/environ.py", line 114
raise ValueError, "No frame marked with %s." % fname
^
SyntaxError: invalid syntax
Hi @borishinzer , Can you please send the screenshot of the errors ? The above errors when formatted in github seems to be all clustered and difficult to understand.
I think the issue is that you have installed environ
instead of django-environ
.
Can you try by removing environ
and reinstalling django-environ
?
Did uninstall environ
and installed django-environ
/opt/horilla/horillaenv/bin/python manage.py makemigrations
Traceback (most recent call last):
File "/opt/horilla/horilla/manage.py", line 22, in <module>
main()
File "/opt/horilla/horilla/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/base.py", line 106, in wrapper
res = handle_func(*args, **kwargs)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/commands/makemigrations.py", line 156, in handle
loader.check_consistent_history(connection)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/db/migrations/loader.py", line 327, in check_consistent_history
raise InconsistentMigrationHistory(
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration onboarding.0003_alter_candidatestage_options_and_more is applied before its dependency recruitment.0004_alter_candidate_job_position_id_and_more on database 'default'.
Was the migrations files somehow removed from the apps?
no. I just did a git pull
and git rebase
Can you try running the makemigrations command again followed by migrate again once more?
/opt/horilla/horillaenv/bin/python manage.py makemigrations
Traceback (most recent call last):
File "/opt/horilla/horilla/manage.py", line 22, in <module>
main()
File "/opt/horilla/horilla/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/base.py", line 106, in wrapper
res = handle_func(*args, **kwargs)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/commands/makemigrations.py", line 156, in handle
loader.check_consistent_history(connection)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/db/migrations/loader.py", line 327, in check_consistent_history
raise InconsistentMigrationHistory(
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration onboarding.0003_alter_candidatestage_options_and_more is applied before its dependency recruitment.0004_alter_candidate_job_position_id_and_more on database 'default'.
/opt/horilla/horillaenv/bin/python manage.py migrate
Traceback (most recent call last):
File "/opt/horilla/horilla/manage.py", line 22, in <module>
main()
File "/opt/horilla/horilla/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/base.py", line 106, in wrapper
res = handle_func(*args, **kwargs)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 120, in handle
executor.loader.check_consistent_history(connection)
File "/opt/horilla/horillaenv/lib/python3.10/site-packages/django/db/migrations/loader.py", line 327, in check_consistent_history
raise InconsistentMigrationHistory(
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration onboarding.0003_alter_candidatestage_options_and_more is applied before its dependency recruitment.0004_alter_candidate_job_position_id_and_more on database 'default'.
Hi @borishinzer , Are you using your production database or the test database in this migrations?
With Regards, Team Horilla
How to find that out? I didn't change any database.
Hi @borishinzer , This is not a generic issue and we need to look into the migration files to have a better understanding of it. Can we have a meeting with our team to assist you in fixing this ?
With Regards, Team Horilla
Hi @borishinzer , Any updates on the above case?
With Regards, Team Horilla