Skip to content

TypeError: 'NoneType' object is not callable #96

@froOzzy

Description

@froOzzy

When using redis_lock , the following errors began to be received:

Traceback (most recent call last):
  File "./appointment/lock.py", line 40, in wrapped
    lock.release()
  File "/home/test/.cache/pypoetry/virtualenvs/pd-GUvEH9yN-py3.7/lib/python3.7/site-packages/redis_lock/__init__.py", line 361, in release
    error = self.unlock_script(client=self._client, keys=(self._name, self._signal), args=(self._id, self._signal_expire))
TypeError: 'NoneType' object is not callable

The latest version of python-redis-lock 3.7.0 is used. Added logging of this error and found that all the functions that are registered at the very beginning are not registered

def register_scripts(cls, redis_client):

A line from the log:

{"timestamp": "2022-08-17T10:15:24.272596", "level": "INFO", "name": "lock_by_ip_and_user", "message": "release failed", "location": "appointment/lock.py:56", "lock": "<redis_lock.Lock object at 0x7f5944878ef0>", "unlock_script": "None", "extend_script": "None", "reset_script": "None", "reset_all_script": "None"}

Please help me to sort out the problem 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions