Open fabaff opened 1 year ago
============================= test session starts ============================== platform linux -- Python 3.11.5, pytest-7.4.2, pluggy-1.2.0 django: settings: django_q.tests.settings (from ini) rootdir: /build/source configfile: pytest.ini plugins: django-4.5.2, mock-3.11.1 collected 44 items / 2 deselected / 42 selected django_q/tests/test_admin.py . [ 2%] django_q/tests/test_brokers.py . [ 4%] django_q/tests/test_cached.py EEEE [ 14%] django_q/tests/test_cluster.py EEEFEEEEEEEEEEEEEE. [ 59%] django_q/tests/test_commands.py FFFF [ 69%] django_q/tests/test_monitor.py FF [ 73%] django_q/tests/test_scheduler.py E... [ 83%] django_q/tests/test_brokers.py F.Fs [ 92%] django_q/tests/test_cluster.py E [ 95%] django_q/tests/test_scheduler.py .. [100%] ==================================== ERRORS ==================================== ________________________ ERROR at setup of test_cached _________________________ dotted_path = 'redis.connection.HiredisParser' def import_string(dotted_path): """ Import a dotted module path and return the attribute/class designated by the last name in the path. Raise ImportError if the import failed. """ try: module_path, class_name = dotted_path.rsplit(".", 1) except ValueError as err: raise ImportError("%s doesn't look like a module path" % dotted_path) from err try: > return cached_import(module_path, class_name) /nix/store/1np01pzgh345r4j350fxp53gb4im07zx-python3.11-Django-4.2.6/lib/python3.11/site-packages/django/utils/module_loading.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ module_path = 'redis.connection', class_name = 'HiredisParser' def cached_import(module_path, class_name): # Check whether module is loaded and fully initialized. if not ( (module := sys.modules.get(module_path)) and (spec := getattr(module, "__spec__", None)) and getattr(spec, "_initializing", False) is False ): module = import_module(module_path) > return getattr(module, class_name) E AttributeError: module 'redis.connection' has no attribute 'HiredisParser' [...]
This repo is not maintained anymore and that's why you are likely getting that error. You can use the django-q2 version instead which has up to date requirements. https://github.com/django-q2/django-q2