Open mluszczyk opened 9 years ago
The following error is reported during posting a submission with images by some users. However for most of the users the upload works correctly.
New submissions appear on the site, but the images aren't uploaded correctly. Opening the image displays error "Attachment not found".
Celery logs don't report any error. You can only find lines like this:
[2015-07-22 04:52:22,269: INFO/MainProcess] Got task from broker: stats.tasks.stat_log[8cde0258-6110-4ea3-b5c7-1119a410b0b9] [2015-07-22 04:52:22,302: INFO/MainProcess] Task stats.tasks.stat_log[8cde0258-6110-4ea3-b5c7-1119a410b0b9] succeeded in 0.0120840072632s: <StatsCount: StatsCount object>
Django error send on email:
Traceback (most recent call last): File "/home/ubuntu/virtual_environments/formhub/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 113, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/home/ubuntu/virtual_environments/formhub/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 41, in inner return func(request, *args, **kwargs) File "/home/ubuntu/virtual_environments/formhub/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 77, in wrapped_view return view_func(*args, **kwargs) File "./odk_logger/views.py", line 231, in submission uuid=uuid, request=request File "/home/ubuntu/virtual_environments/formhub/local/lib/python2.7/site-packages/django/db/transaction.py", line 223, in inner return func(*args, **kwargs) File "./utils/logger_tools.py", line 225, in create_instance _save_attachments.delay(instance.pk, media_files) File "/home/ubuntu/virtual_environments/formhub/local/lib/python2.7/site-packages/celery/app/task.py", line 358, in delay return self.apply_async(args, kwargs) File "/home/ubuntu/virtual_environments/formhub/local/lib/python2.7/site-packages/celery/app/task.py", line 474, in apply_async **options) File "/home/ubuntu/virtual_environments/formhub/local/lib/python2.7/site-packages/celery/app/amqp.py", line 249, in publish_task **kwargs File "/home/ubuntu/virtual_environments/formhub/local/lib/python2.7/site-packages/kombu/messaging.py", line 157, in publish compression, headers) File "/home/ubuntu/virtual_environments/formhub/local/lib/python2.7/site-packages/kombu/messaging.py", line 233, in _prepare body) = encode(body, serializer=serializer) File "/home/ubuntu/virtual_environments/formhub/local/lib/python2.7/site-packages/kombu/serialization.py", line 170, in encode payload = encoder(data) File "/home/ubuntu/virtual_environments/formhub/local/lib/python2.7/site-packages/kombu/serialization.py", line 356, in dumps return dumper(obj, protocol=pickle_protocol) TypeError: expected string or Unicode object, NoneType found <WSGIRequest path:/…/submission, GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'csrftoken': '3G3cJaHqa8dWXwXeWHQqI93NdMBwsV3t'}, META:{'CONTENT_LENGTH': '3102763', 'CONTENT_TYPE': 'multipart/form-data; boundary=kSuve9oSceN2lcajFLBNA7xBQyxdvr', u'CSRF_COOKIE': u'3G3cJaHqa8dWXwXeWHQqI93NdMBwsV3t', 'DOCUMENT_ROOT': '/usr/share/nginx/html', 'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_CONTENT_LENGTH': '3102763', 'HTTP_CONTENT_TYPE': 'multipart/form-data; boundary=kSuve9oSceN2lcajFLBNA7xBQyxdvr', 'HTTP_COOKIE': 'csrftoken=3G3cJaHqa8dWXwXeWHQqI93NdMBwsV3t', 'HTTP_DATE': 'Wed, 22 Jul 2015 11:51:18 GMT', 'HTTP_HOST': '…', 'HTTP_X_OPENROSA_VERSION': '1.0', 'PATH_INFO': u'/…/submission', 'QUERY_STRING': '', 'REMOTE_ADDR': '…', 'REMOTE_PORT': '38473', 'REQUEST_METHOD': 'POST', 'REQUEST_URI': '/…/submission', u'SCRIPT_NAME': u'', 'SERVER_NAME': '…', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.1', 'UWSGI_SCHEME': 'http', 'uwsgi.node': '…', 'uwsgi.version': '1.9.17.1-debian', 'wsgi.errors': <open file 'wsgi_errors', mode 'w' at 0x7f833abdde40>, 'wsgi.file_wrapper': <built-in function uwsgi_sendfile>, 'wsgi.input': <uwsgi._Input object at 0x7f8332ca4990>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
The following error is reported during posting a submission with images by some users. However for most of the users the upload works correctly.
New submissions appear on the site, but the images aren't uploaded correctly. Opening the image displays error "Attachment not found".
Celery logs don't report any error. You can only find lines like this:
[2015-07-22 04:52:22,269: INFO/MainProcess] Got task from broker: stats.tasks.stat_log[8cde0258-6110-4ea3-b5c7-1119a410b0b9] [2015-07-22 04:52:22,302: INFO/MainProcess] Task stats.tasks.stat_log[8cde0258-6110-4ea3-b5c7-1119a410b0b9] succeeded in 0.0120840072632s: <StatsCount: StatsCount object>
Django error send on email: