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

Version 4.3.3 AttributeError: 'NoneType' object has no attribute 'split' #2215

Closed
kosuke-zhang opened this issue Jun 4, 2022 · 6 comments
Closed
Assignees

Comments

@kosuke-zhang
Copy link
Contributor

 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 "/var/user/django/utils/autoreload.py", line 64, in wrapper

    fn(*args, **kwargs)

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

    self.check(display_num_errors=True)

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

    databases=databases,

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

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

  File "/var/user/django/core/checks/caches.py", line 63, in check_file_based_cache_is_absolute

    cache = caches[alias]

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

    conn = self.create_connection(alias)

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

    return backend_cls(location, params)

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

    self._client_cls = import_string(self._client_cls)

  File "/var/user/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 "<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/django_redis/client/__init__.py", line 1, in <module>

    from .default import DefaultClient

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

    from redis import Redis

  File "/var/user/redis/__init__.py", line 54, in <module>

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

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

Screen Shot 2022-06-04 at 18 20 48

@inputvalidation
Copy link

This still appears to affect 4.3.5 as well, this time on Python 3.8.

@chayim
Copy link
Contributor

chayim commented Nov 23, 2022

@dvora-h can you have a look?

@inputvalidation
Copy link

Did you have a chance to have a look?

@SessionIssue
Copy link
Contributor

I've got the same issue once in a while. Would be nice if you could implement a fallback for this.

SessionIssue added a commit to SessionIssue/redis-py that referenced this issue Jan 4, 2023
dvora-h pushed a commit that referenced this issue Jan 5, 2023
@dvora-h
Copy link
Collaborator

dvora-h commented Jan 8, 2023

Fixed in #2539 and #2542

@dvora-h dvora-h closed this as completed Jan 8, 2023
@kosuke-zhang
Copy link
Contributor Author

you not resolve it in latest version 4.4.2...

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

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

5 participants