Skip to content

TypeError: tuple expected at most 1 arguments, got 3 #2572

Closed
@kosuke-zhang

Description

@kosuke-zhang
Exception in thread django-main-thread:

Traceback (most recent call last):

  File "/opt/redis/__init__.py", line 57, in <module>

    VERSION = tuple(map(int_or_str, __version__.split(".")))

AttributeError: 'NoneType' object has no attribute 'split'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/var/lang/python37/lib/python3.7/threading.py", line 926, in _bootstrap_inner

    self.run()

  File "/var/lang/python37/lib/python3.7/threading.py", line 870, in run

    self._target(*self._args, **self._kwargs)

  File "/opt/django/utils/autoreload.py", line 64, in wrapper

    fn(*args, **kwargs)

  File "/opt/django/core/management/commands/runserver.py", line 118, in inner_run

    self.check(display_num_errors=True)

  File "/opt/django/core/management/base.py", line 423, in check

    databases=databases,

  File "/opt/django/core/checks/registry.py", line 76, in run_checks

    new_errors = check(app_configs=app_configs, databases=databases)

  File "/opt/django/core/checks/urls.py", line 40, in check_url_namespaces_unique

    all_namespaces = _load_all_namespaces(resolver)

  File "/opt/django/core/checks/urls.py", line 57, in _load_all_namespaces

    url_patterns = getattr(resolver, 'url_patterns', [])

  File "/opt/django/utils/functional.py", line 48, in __get__

    res = instance.__dict__[self.name] = self.func(instance)

  File "/opt/django/urls/resolvers.py", line 602, in url_patterns

    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)

  File "/opt/django/utils/functional.py", line 48, in __get__

    res = instance.__dict__[self.name] = self.func(instance)

  File "/opt/django/urls/resolvers.py", line 595, in urlconf_module

    return import_module(self.urlconf_name)

  File "/var/lang/python37/lib/python3.7/importlib/__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import

  File "<frozen importlib._bootstrap>", line 983, in _find_and_load

  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked

  File "<frozen importlib._bootstrap_external>", line 728, in exec_module

  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

  File "/var/user/backend/urls.py", line 23, in <module>

    from app_config.views import get_app_config

  File "/var/user/apps/app_config/views.py", line 11, in <module>

    @permission_classes((AllowAny,))

  File "/opt/django/utils/decorators.py", line 117, in _decorator

    middleware = middleware_class(view_func, *m_args, **m_kwargs)

  File "/opt/django/middleware/cache.py", line 174, in __init__

    super().__init__(get_response)

  File "/opt/django/middleware/cache.py", line 67, in __init__

    super().__init__(get_response)

  File "/opt/django/middleware/cache.py", line 133, in __init__

    self.cache = caches[self.cache_alias]

  File "/opt/django/utils/connection.py", line 62, in __getitem__

    conn = self.create_connection(alias)

  File "/opt/django/core/cache/__init__.py", line 44, in create_connection

    return backend_cls(location, params)

  File "/opt/django_redis/cache.py", line 53, in __init__

    self._client_cls = import_string(self._client_cls)

  File "/opt/django/utils/module_loading.py", line 17, in import_string

    module = import_module(module_path)

  File "/var/lang/python37/lib/python3.7/importlib/__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "/opt/django_redis/client/__init__.py", line 1, in <module>

    from .default import DefaultClient

  File "/opt/django_redis/client/default.py", line 12, in <module>

    from redis import Redis

  File "/opt/redis/__init__.py", line 59, in <module>

    VERSION = tuple(99, 99, 99)

TypeError: tuple expected at most 1 arguments, got 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions