You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After bulk uploading a CSV file, I want to send every user their login credentials. When I try to send the "time to vote" mail, I get the following error. Note that this is with the latest code on master.
Environment:
Request Method: POST
Request URL: http://<redacted>/b1c27b0a-8b4d-11ea-85f5-0242ac130006/voters/email?template=simple&voter_id=
Django Version: 1.11.28
Python Version: 2.7.18
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'helios_auth',
'helios',
'server_ui')
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'helios.security.HSTSMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware']
Traceback:
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/app/helios/security.py" in election_admin_wrapper
182. return func(request, election, *args, **kw)
File "/app/helios/views.py" in voters_email
1409. tasks.voters_email.delay(election_id = election.id, subject_template = subject_template, body_template = body_template, extra_vars = extra_vars, voter_constraints_include = voter_constraints_include, voter_constraints_exclude = voter_constraints_exclude)
File "/usr/local/lib/python2.7/site-packages/celery/app/task.py" in delay
408. return self.apply_async(args, kwargs)
File "/usr/local/lib/python2.7/site-packages/celery/app/task.py" in apply_async
535. **options
File "/usr/local/lib/python2.7/site-packages/celery/app/base.py" in send_task
745. amqp.send_task_message(P, name, message, **options)
File "/usr/local/lib/python2.7/site-packages/celery/app/amqp.py" in send_task_message
552. **properties
File "/usr/local/lib/python2.7/site-packages/kombu/messaging.py" in publish
169. compression, headers)
File "/usr/local/lib/python2.7/site-packages/kombu/messaging.py" in _prepare
252. body) = dumps(body, serializer=serializer)
File "/usr/local/lib/python2.7/site-packages/kombu/serialization.py" in dumps
221. payload = encoder(data)
File "/usr/local/lib/python2.7/contextlib.py" in __exit__
35. self.gen.throw(type, value, traceback)
File "/usr/local/lib/python2.7/site-packages/kombu/serialization.py" in _reraise_errors
54. reraise(wrapper, wrapper(exc), sys.exc_info()[2])
File "/usr/local/lib/python2.7/site-packages/kombu/serialization.py" in _reraise_errors
50. yield
File "/usr/local/lib/python2.7/site-packages/kombu/serialization.py" in dumps
221. payload = encoder(data)
File "/usr/local/lib/python2.7/site-packages/kombu/utils/json.py" in dumps
69. **dict(default_kwargs, **kwargs))
File "/usr/local/lib/python2.7/json/__init__.py" in dumps
251. sort_keys=sort_keys, **kw).encode(obj)
File "/usr/local/lib/python2.7/json/encoder.py" in encode
207. chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/lib/python2.7/json/encoder.py" in iterencode
270. return _iterencode(o, 0)
File "/usr/local/lib/python2.7/site-packages/kombu/utils/json.py" in default
59. return super(JSONEncoder, self).default(o)
File "/usr/local/lib/python2.7/json/encoder.py" in default
184. raise TypeError(repr(o) + " is not JSON serializable")
Exception Type: EncodeError at /helios/elections/b1c27b0a-8b4d-11ea-85f5-0242ac130006/voters/email
Exception Value: <Election: Election object> is not JSON serializable
The text was updated successfully, but these errors were encountered:
After bulk uploading a CSV file, I want to send every user their login credentials. When I try to send the "time to vote" mail, I get the following error. Note that this is with the latest code on master.
The text was updated successfully, but these errors were encountered: