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

Upgrading to django-iconify v0.3 fails #1018

Closed
mikkonie opened this issue Aug 26, 2022 · 2 comments
Closed

Upgrading to django-iconify v0.3 fails #1018

mikkonie opened this issue Aug 26, 2022 · 2 comments
Assignees
Labels
bug Something isn't working environment Issues of dependencies, CI, deployment etc. ongoing Ongoing issue, needs observation or pending on other projects

Comments

@mikkonie
Copy link
Collaborator

mikkonie commented Aug 26, 2022

While doing #1003, I noticed that upgrading to django-iconify==0.3 causes a crash on server startup and executing tests. Posting the traceback in comments.

This doesn't seem to be a critical upgrade, so I'll keep it in 0.1.1 and look into this detail when I have time. This may be a bug to report to the author.

@mikkonie mikkonie added bug Something isn't working environment Issues of dependencies, CI, deployment etc. ongoing Ongoing issue, needs observation or pending on other projects labels Aug 26, 2022
@mikkonie mikkonie self-assigned this Aug 26, 2022
@mikkonie
Copy link
Collaborator Author

Error dump:

Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
    fn(*args, **kwargs)
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 118, in inner_run
    self.check(display_num_errors=True)
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/django/core/management/base.py", line 419, in check
    all_issues = checks.run_checks(
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/django/core/checks/registry.py", line 76, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/django/core/checks/urls.py", line 13, in check_url_config
    return check_resolver(resolver)
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/django/core/checks/urls.py", line 23, in check_resolver
    return check_method()
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/django/urls/resolvers.py", line 416, in check
    for pattern in self.url_patterns:
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/django/urls/resolvers.py", line 602, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/django/urls/resolvers.py", line 595, in urlconf_module
    return import_module(self.urlconf_name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/mikkopen/code/sodar_core/config/urls.py", line 34, in <module>
    url(r'icons/', include('dj_iconify.urls')),
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/django/urls/conf.py", line 34, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/dj_iconify/urls.py", line 3, in <module>
    from . import views
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/dj_iconify/views.py", line 14, in <module>
    from .types import IconifyJSON
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/dj_iconify/types.py", line 9, in <module>
    from .util import split_css_unit
  File "/home/mikkopen/.virtualenvs/sodar_core11/lib/python3.8/site-packages/dj_iconify/util.py", line 39, in <module>
    def icon_choices(collection: str) -> list[tuple[str, str]]:
TypeError: 'type' object is not subscriptable

@mikkonie
Copy link
Collaborator Author

mikkonie commented Mar 4, 2024

After #880 this works. v0.4 is also out at the time of writing, but it arbitrarily requires Python>=3.10. I'll stick to v0.3 for now.

@mikkonie mikkonie closed this as completed Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working environment Issues of dependencies, CI, deployment etc. ongoing Ongoing issue, needs observation or pending on other projects
Projects
None yet
Development

No branches or pull requests

1 participant