Error Traceback most recent call last File vagrant src celery-haystack

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Error
Traceback (most recent call last):
File "/vagrant/src/celery-haystack/celery_haystack/tasks.py", line 120, in run
current_index.remove_object(identifier, using=using)
File "/vagrant/legal/search_indexes.py", line 106, in remove_object
self.update_sub_matter(instance.sub_matter, using=using, **kwargs)
AttributeError: 'str' object has no attribute 'sub_matter'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/vagrant/pekama/test/mixins.py", line 312, in test_collaborator_can_delete_object
res = self.client.delete(reverse(self._reverse_detail, args=(obj.pk,)))
File "/usr/local/lib/python3.4/dist-packages/rest_framework/test.py", line 192, in delete
path, data=data, format=format, content_type=content_type, **extra)
File "/usr/local/lib/python3.4/dist-packages/rest_framework/test.py", line 102, in delete
return self.generic('DELETE', path, data, content_type, **extra)
File "/usr/local/lib/python3.4/dist-packages/rest_framework/compat.py", line 214, in generic
return self.request(**r)
File "/usr/local/lib/python3.4/dist-packages/rest_framework/test.py", line 157, in request
return super(APIClient, self).request(**kwargs)
File "/usr/local/lib/python3.4/dist-packages/rest_framework/test.py", line 109, in request
request = super(APIRequestFactory, self).request(**kwargs)
File "/usr/local/lib/python3.4/dist-packages/django/test/client.py", line 440, in request
six.reraise(*exc_info)
File "/usr/local/lib/python3.4/dist-packages/django/utils/six.py", line 659, in reraise
raise value
File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.4/dist-packages/django/views/decorators/csrf.py", line 57, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/rest_framework/viewsets.py", line 85, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/rest_framework/views.py", line 407, in dispatch
response = self.handle_exception(exc)
File "/usr/local/lib/python3.4/dist-packages/rest_framework/views.py", line 404, in dispatch
response = handler(request, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/rest_framework/mixins.py", line 85, in destroy
self.perform_destroy(instance)
File "/usr/local/lib/python3.4/dist-packages/rest_framework/mixins.py", line 89, in perform_destroy
instance.delete()
File "/usr/local/lib/python3.4/dist-packages/django/db/models/base.py", line 739, in delete
collector.delete()
File "/usr/local/lib/python3.4/dist-packages/django/db/models/deletion.py", line 284, in delete
sender=model, instance=obj, using=self.using
File "/usr/local/lib/python3.4/dist-packages/django/db/transaction.py", line 382, in __exit__
connection.set_autocommit(True)
File "/usr/local/lib/python3.4/dist-packages/transaction_hooks/mixin.py", line 58, in set_autocommit
self.run_and_clear_commit_hooks()
File "/usr/local/lib/python3.4/dist-packages/transaction_hooks/mixin.py", line 38, in run_and_clear_commit_hooks
func()
File "/vagrant/src/celery-haystack/celery_haystack/utils.py", line 40, in <lambda>
lambda: task.apply_async((action, identifier), {}, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/celery/app/task.py", line 547, in apply_async
link=link, link_error=link_error, **options)
File "/usr/local/lib/python3.4/dist-packages/celery/app/task.py", line 739, in apply
request=request, propagate=throw)
File "/usr/local/lib/python3.4/dist-packages/celery/app/trace.py", line 355, in eager_trace_task
uuid, args, kwargs, request)
File "/usr/local/lib/python3.4/dist-packages/celery/app/trace.py", line 253, in trace_task
I, R, state, retval = on_error(task_request, exc, uuid)
File "/usr/local/lib/python3.4/dist-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/vagrant/src/celery-haystack/celery_haystack/tasks.py", line 123, in run
self.retry(exc=exc)
File "/usr/local/lib/python3.4/dist-packages/celery/app/task.py", line 672, in retry
S.apply().get()
File "/usr/local/lib/python3.4/dist-packages/celery/canvas.py", line 181, in apply
return self.type.apply(args, kwargs, **options)
File "/usr/local/lib/python3.4/dist-packages/celery/app/task.py", line 739, in apply
request=request, propagate=throw)
File "/usr/local/lib/python3.4/dist-packages/celery/app/trace.py", line 355, in eager_trace_task
uuid, args, kwargs, request)
File "/usr/local/lib/python3.4/dist-packages/celery/app/trace.py", line 253, in trace_task
I, R, state, retval = on_error(task_request, exc, uuid)
File "/usr/local/lib/python3.4/dist-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/vagrant/src/celery-haystack/celery_haystack/tasks.py", line 123, in run
self.retry(exc=exc)
File "/usr/local/lib/python3.4/dist-packages/celery/app/task.py", line 660, in retry
maybe_reraise()
File "/usr/local/lib/python3.4/dist-packages/celery/utils/__init__.py", line 242, in maybe_reraise
reraise(exc_info[0], exc_info[1], exc_info[2])
File "/usr/local/lib/python3.4/dist-packages/celery/five.py", line 87, in reraise
raise value
File "/vagrant/src/celery-haystack/celery_haystack/tasks.py", line 120, in run
current_index.remove_object(identifier, using=using)
File "/vagrant/legal/search_indexes.py", line 106, in remove_object
self.update_sub_matter(instance.sub_matter, using=using, **kwargs)
AttributeError: 'str' object has no attribute 'sub_matter'