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

Can't run app in Django 4.2, Python 3.9 #18

Open
kunambi opened this issue May 15, 2024 · 0 comments
Open

Can't run app in Django 4.2, Python 3.9 #18

kunambi opened this issue May 15, 2024 · 0 comments

Comments

@kunambi
Copy link

kunambi commented May 15, 2024

After trying to install and use the app, I get an error when trying to start localhost manage.py runserver.

Running:

  • Django 4.2 LTS
  • Python 3.9.13
Exception in thread django-main-thread:
Traceback (most recent call last):
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\utils.py", line 69, in __getitem__
    return self._engines[alias]
KeyError: 'django'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\python39\lib\threading.py", line 980, in _bootstrap_inner
    self.run()
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\sentry_sdk\integrations\threading.py", line 72, in run
    reraise(*_capture_exception())
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\sentry_sdk\_compat.py", line 60, in reraise
    raise value
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\sentry_sdk\integrations\threading.py", line 70, in run
    return old_run_func(self, *a, **kw)
  File "c:\python39\lib\threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\daphne\management\commands\runserver.py", line 96, in inner_run
    self.check(display_num_errors=True)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\core\management\base.py", line 485, in check
    all_issues = checks.run_checks(
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\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\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\contrib\admin\checks.py", line 78, in check_dependencies
    for engine in engines.all():
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\utils.py", line 94, in all
    return [self[alias] for alias in self]
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\utils.py", line 94, in <listcomp>
    return [self[alias] for alias in self]
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\utils.py", line 85, in __getitem__
    engine = engine_cls(params)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\backends\django.py", line 24, in __init__
    options["libraries"] = self.get_templatetag_libraries(libraries)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\backends\django.py", line 42, in get_templatetag_libraries
    libraries = get_installed_libraries()
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\backends\django.py", line 116, in get_installed_libraries
    return {
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\backends\django.py", line 116, in <dictcomp>
    return {
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\backends\django.py", line 105, in get_template_tag_modules
    for name in get_package_libraries(pkg):
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\backends\django.py", line 128, in get_package_libraries
    module = import_module(entry[1])
  File "c:\python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\jstemplate\templatetags\base.py", line 3, in <module>
    from ..loading import find, preprocess, JSTemplateNotFound
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\jstemplate\loading.py", line 76, in <module>
    finders = _get_finders()
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\jstemplate\loading.py", line 68, in _get_finders
    return _get_classes(conf.JSTEMPLATE_FINDERS)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\jstemplate\loading.py", line 51, in _get_classes
    mod = import_module(modpath)
  File "c:\python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\jstemplate\finders.py", line 122, in <module>
    app_template_dirs = _get_app_template_dirs()
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\jstemplate\finders.py", line 112, in _get_app_template_dirs
    app_dir = os.path.dirname(os.path.abspath(mod.__file__))
  File "c:\python39\lib\ntpath.py", line 527, in abspath
    return normpath(_getfullpathname(path))
TypeError: _getfullpathname: path should be string, bytes or os.PathLike, not NoneType
Traceback (most recent call last):
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\utils.py", line 69, in __getitem__
    return self._engines[alias]
KeyError: 'django'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\xampp\htdocs\premind\manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\core\management\__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\core\management\base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\core\management\commands\runserver.py", line 74, in execute
    super().execute(*args, **options)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\core\management\base.py", line 458, in execute
    output = self.handle(*args, **options)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\daphne\management\commands\runserver.py", line 86, in handle
    super().handle(*args, **options)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\core\management\commands\runserver.py", line 111, in handle
    self.run(**options)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\core\management\commands\runserver.py", line 118, in run
    autoreload.run_with_reloader(self.inner_run, **options)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\utils\autoreload.py", line 671, in run_with_reloader
    start_django(reloader, main_func, *args, **kwargs)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\utils\autoreload.py", line 660, in start_django
    reloader.run(django_main_thread)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\utils\autoreload.py", line 343, in run
    autoreload_started.send(sender=self)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\dispatch\dispatcher.py", line 176, in send
    return [
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\dispatch\dispatcher.py", line 177, in <listcomp>
    (receiver, receiver(signal=self, sender=sender, **named))
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\sentry_sdk\integrations\django\signals_handlers.py", line 66, in wrapper
    return receiver(*args, **kwargs)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\autoreload.py", line 43, in watch_for_template_changes
    for directory in get_template_directories():
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\autoreload.py", line 16, in get_template_directories
    for backend in engines.all():
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\utils.py", line 94, in all
    return [self[alias] for alias in self]
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\utils.py", line 94, in <listcomp>
    return [self[alias] for alias in self]
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\utils.py", line 85, in __getitem__
    engine = engine_cls(params)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\backends\django.py", line 24, in __init__
    options["libraries"] = self.get_templatetag_libraries(libraries)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\backends\django.py", line 42, in get_templatetag_libraries
    libraries = get_installed_libraries()
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\backends\django.py", line 116, in get_installed_libraries
    return {
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\backends\django.py", line 116, in <dictcomp>
    return {
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\backends\django.py", line 105, in get_template_tag_modules
    for name in get_package_libraries(pkg):
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\django\template\backends\django.py", line 128, in get_package_libraries
    module = import_module(entry[1])
  File "c:\python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\jstemplate\templatetags\base.py", line 3, in <module>
    from ..loading import find, preprocess, JSTemplateNotFound
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\jstemplate\loading.py", line 76, in <module>
    finders = _get_finders()
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\jstemplate\loading.py", line 68, in _get_finders
    return _get_classes(conf.JSTEMPLATE_FINDERS)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\jstemplate\loading.py", line 51, in _get_classes
    mod = import_module(modpath)
  File "c:\python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\jstemplate\finders.py", line 122, in <module>
    app_template_dirs = _get_app_template_dirs()
  File "C:\Users\Owner\.virtualenvs\6P0nJig8\lib\site-packages\jstemplate\finders.py", line 112, in _get_app_template_dirs
    app_dir = os.path.dirname(os.path.abspath(mod.__file__))
  File "c:\python39\lib\ntpath.py", line 527, in abspath
    return normpath(_getfullpathname(path))
TypeError: _getfullpathname: path should be string, bytes or os.PathLike, not NoneType
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

1 participant