Smile-94 / payroll-management-system-dola

Django Payroll Management System is a web app that simplifies the payroll process for organizations. It automates employee salary calculations, tax deductions, and generates pay stubs. It also manages employee information, leave, and attendance records. This system saves time, reduces errors, and ensures compliance with regulations.
3 stars 1 forks source link

tracebacks on python manage.py makemigrations #1

Open Febzzz12 opened 1 year ago

Febzzz12 commented 1 year ago

Traceback (most recent call last): File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\environ\environ.py", line 403, in get_value value = self.ENVIRON[var_name]


  File "<frozen os>", line 679, in __getitem__
KeyError: 'SECRET_KEY'

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

Traceback (most recent call last):
  File "C:\Users\LENOVO\Documents\payroll-management-system-dola-master\manage.py", line 22, in <module>
    main()
  File "C:\Users\LENOVO\Documents\payroll-management-system-dola-master\manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\base.py", line 402, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\base.py", line 443, in execute
    self.check()
  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\base.py", line 475, in check
    all_issues = checks.run_checks(
                 ^^^^^^^^^^^^^^^^^^
  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\checks\registry.py", line 88, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\checks\translation.py", line 62, in check_language_settings_consistent
    get_supported_language_variant(settings.LANGUAGE_CODE)
                                   ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\conf\__init__.py", line 92, in __getattr__
    self._setup(name)
  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\conf\__init__.py", line 79, in _setup
    self._wrapped = Settings(settings_module)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\conf\__init__.py", line 190, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 
126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\LENOVO\Documents\payroll-management-system-dola-master\config\settings.py", line 29, in <module>
    SECRET_KEY = env('SECRET_KEY')
                 ^^^^^^^^^^^^^^^^^
  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\environ\environ.py", line 197, in __call__
    return self.get_value(
           ^^^^^^^^^^^^^^^
  File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\environ\environ.py", line 407, in get_value
    raise ImproperlyConfigured(error_msg) from exc
django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable
Smile-94 commented 1 year ago

create a .env file and paste the code below DEBUG=on SECRET_KEY=django-insecure-zbv6rm49ga1002$7(-cv%i#l_6y!3ma=i7yh!&b@ _c+kothw

Thanks & Regards, Sazzad Hossen Software Developer, Triangle Technologies Ltd. https://triangletech.com.bd/ Contact: +8801921719924 Sector 10, Uttara Dhaka 1230, Bangladesh

On Wed, Mar 22, 2023 at 12:30 AM Febzzz12 @.***> wrote:

Traceback (most recent call last): File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\environ\environ.py", line 403, in get_value value = self.ENVIRON[var_name]


File "", line 679, in *getitem*
KeyError: 'SECRET_KEY'

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

Traceback (most recent call last):
File
"C:\Users\LENOVO\Documents\payroll-management-system-dola-master\manage.py",
line 22, in
main()
File
"C:\Users\LENOVO\Documents\payroll-management-system-dola-master\manage.py",
line 18, in main
execute_from_command_line(sys.argv)
File
"C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management_
*init*_.py", line 446, in execute_from_command_line
utility.execute()
File
"C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management_
*init*_.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\base.py",
line 402, in run_from_argv
self.execute(*args, **cmd_options)
File
"C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\base.py",
line 443, in execute
self.check()
File
"C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\base.py",
line 475, in check
all_issues = checks.run_checks(
^^^^^^^^^^^^^^^^^^
File
"C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\checks\registry.py",
line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\checks\translation.py",
line 62, in check_language_settings_consistent
get_supported_language_variant(settings.LANGUAGE_CODE)
^^^^^^^^^^^^^^^^^^^^^^
File
"C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\conf_
*init*_.py", line 92, in *getattr*
self.
*setup(name) File
"C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\conf_init*.py",
line 79, in

*setup self.wrapped = Settings(settings_module) ^^^^^^^^^^^^^^^^^^^^^^^^^
File
"C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\conf_init.py",
line 190, in init mod = importlib.import_module(self.SETTINGS_MODULE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File
"C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\importlib_init*.py",
line
126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1206, in _gcd_import
File "", line 1178, in _find_and_load
File "", line 1149, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File
"C:\Users\LENOVO\Documents\payroll-management-system-dola-master\config\settings.py",
line 29, in
SECRET_KEY = env('SECRET_KEY')
^^^^^^^^^^^^^^^^^
File
"C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\environ\environ.py",
line 197, in *call*
return self.get_value(
^^^^^^^^^^^^^^^
File
"C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\environ\environ.py",
line 407, in get_value
raise ImproperlyConfigured(error_msg) from exc
django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY
environment variable

—
Reply to this email directly, view it on GitHub
<https://github.com/Smile-94/payroll-management-system-dola/issues/1>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOAD2XTMHRXHJF2ZUHT6NVLW5HXTFANCNFSM6AAAAAAWC2RHMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>