coddingtonbear / inthe.am

Access your Taskwarrior tasks from any browser anywhere
https://inthe.am/
GNU Affero General Public License v3.0
593 stars 51 forks source link

Annotation not saved #424

Open ikenichiro opened 1 year ago

ikenichiro commented 1 year ago

From the webpage, adding an annotation fails. However when trying to add an annotation, the web UI indicates that the annotation is saved, but if you reload the webpage, you would notice that the annotation is not actually saved. Looking at the DevTools, the api is returing 500 (Internal Server Error) upon trying to add the annotation. I checked it using the latest Firefox 102.9.0esr (64-bit), and Chromium 111.0.5563.147(Official Build, ungoogled-chromium)

coddingtonbear commented 1 year ago

Looking at the logs for this -- this is the error:

web_1             | ERROR Internal Server Error: /api/v2/tasks/ddc97e41-4e82-4b34-9e12-97e3afb81b84/
web_1             | Traceback (most recent call last):
web_1             |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 41, in inner
web_1             |     response = get_response(request)
web_1             |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 187, in _get_response
web_1             |     response = self.process_exception_by_middleware(e, request)
web_1             |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 185, in _get_response
web_1             |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
web_1             |   File "/usr/local/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
web_1             |     return view_func(*args, **kwargs)
web_1             |   File "/usr/local/lib/python3.8/site-packages/rest_framework/viewsets.py", line 114, in view
web_1             |     return self.dispatch(request, *args, **kwargs)
web_1             |   File "./inthe_am/taskmanager/viewsets/task.py", line 93, in dispatch
web_1             |     return super().dispatch(request, *args, **kwargs)
web_1             |   File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 505, in dispatch
web_1             |     response = self.handle_exception(exc)
web_1             |   File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 465, in handle_exception
web_1             |     self.raise_uncaught_exception(exc)
web_1             |   File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
web_1             |     raise exc
web_1             |   File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 502, in dispatch
web_1             |     response = handler(request, *args, **kwargs)
web_1             |   File "./inthe_am/taskmanager/decorators.py", line 34, in wrapper
web_1             |     result = f(self, *args, **kwargs)
web_1             |   File "./inthe_am/taskmanager/decorators.py", line 72, in wrapper
web_1             |     result = f(self, *args, **kwargs)
web_1             |   File "./inthe_am/taskmanager/viewsets/task.py", line 159, in update
web_1             |     task, changes = serializer.update(store, pk, serializer.validated_data)
web_1             |   File "./inthe_am/taskmanager/serializers/task.py", line 58, in update
web_1             |     store.client.task_update(original)
web_1             |   File "/src/taskw/taskw/warrior.py", line 789, in task_update
web_1             |     self._extract_annotations_from_task(task_to_modify)
web_1             |   File "/src/taskw/taskw/warrior.py", line 98, in _extract_annotations_from_task
web_1             |     annotations.append(six.text_type(v))
web_1             | NameError: name 'six' is not defined

I'm not available to make the time to fix this, though -- definitely feel free to post a pull request if you'd like to fix it!