TypeError traceback during freeze
Reported by Neal McBurnett | August 29th, 2010 @ 08:20 PM | in v3.1
While freezing an election after a lot of editing of the question, I got a debug traceback screen. A copy-and-paste of it (after expanding all the "local vars" sections) is below.
This was in Google Chrome 6.0.472.51 beta on Ubuntu Linux Lucid (10.04)
I don't notice anything wrong with the election when I log in to helios from a new window, and I've voted once now.
The election is http://vote.heliosvoting.org/helios/elections/a37d4358-b3d1-11df-94...
TypeError at
/helios/elections/a37d4358-b3d1-11df-94ac-12313f025959/freeze
unsupported operand type(s) for : 'NoneType' and 'instance'
Request Method: POST
Request URL:
http://vote.heliosvoting.org/helios/elections/a37d4358-b3d1-11df-94...
Exception Type: TypeError
Exception Value:
unsupported operand type(s) for : 'NoneType' and
'instance'
Exception Location: /web/helios-server/helios/models.py in freeze,
line 312
Python Executable: /usr/bin/python
Python Version: 2.6.5
Python Path:
['/usr/local/lib/python2.6/dist-packages/celery-2.0.2-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/pyparsing-1.5.3-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/carrot-0.10.5-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/anyjson-0.2.4-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6.3-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/mailer-0.5-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/importlib-1.0.2-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/amqplib-0.6.1-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/django_celery-2.0.2-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/django_picklefield-0.1.6-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/python_dateutil-1.5-py2.6.egg',
'/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload',
'/usr/lib/python2.6/dist-packages', '/usr/lib/pymodules/python2.6',
'/usr/lib/pymodules/python2.6/gtk-2.0',
'/usr/local/lib/python2.6/dist-packages', '/web/helios-server']
Server time: Sun, 29 Aug 2010 18:38:56 -0700
Traceback Switch to copy-and-paste view
/usr/lib/pymodules/python2.6/django/core/handlers/base.py in get_response
response = callback(request, *callback_args, **callback_kwargs) ...
▼ Local vars
Variable Value
callback
callback_args
() callback_kwargs
{'election_uuid': u'a37d4358-b3d1-11df-94ac-12313f025959'} e
TypeError("unsupported operand type(s) for : 'NoneType' and
'instance'",)
exc_info
(, TypeError("unsupported operand type(s) for : 'NoneType' and
'instance'",), ) exceptions
middleware_method
>
receivers
[(, None)] request
, POST:<QueryDict: {u'csrf_token':
[u'2fd5275c-f039-4a7b-adb5-55a1c81e4b89']}>,
COOKIES:{'sessionid': '4cd10649366b6f96afdc1444f0e44b67'},
META:{'CONTENT_LENGTH': '47', 'CONTENT_TYPE':
'application/x-www-form-urlencoded', 'DOCUMENT_ROOT':
'/web/helios-server', 'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT':
'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'HTTP_CACHE_CONTROL':
'max-age=0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=4cd10649366b6f96afdc1444f0e44b67', 'HTTP_HOST':
'vote.heliosvoting.org', 'HTTP_ORIGIN': 'http://vote.heliosvoting.org',
'HTTP_REFERER': 'http://vote.heliosvoting.org/helios/elections/a37d4358-b3d1-11df-94...,
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US)
AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.36
Safari/534.3', 'PATH': '/usr/local/bin:/usr/bin:/bin', 'PATH_INFO':
u'/helios/elections/a37d4358-b3d1-11df-94ac-12313f025959/freeze',
'PATH_TRANSLATED':
'/web/helios-server/django.wsgi/helios/elections/a37d4358-b3d1-11df-94ac-12313f025959/freeze',
'QUERY_STRING': '', 'REMOTE_ADDR': '67.190.100.88', 'REMOTE_PORT':
'40728', 'REQUEST_METHOD': 'POST', 'REQUEST_URI':
'/helios/elections/a37d4358-b3d1-11df-94ac-12313f025959/freeze',
'SCRIPT_FILENAME': '/web/helios-server/django.wsgi', 'SCRIPT_NAME':
u'', 'SERVER_ADDR': '10.166.90.167', 'SERVER_ADMIN': 'webmaster@heliosvoting.org',
'SERVER_NAME': 'vote.heliosvoting.org', 'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SIGNATURE': '
resolver
response
None
self
<django.core.handlers.wsgi.WSGIHandler object at 0xb6cef28c>
settings
<django.conf.LazySettings object at 0xb81d79ac>
urlconf
'urls' urlresolvers
/web/helios-server/helios/security.py in election_admin_wrapper
return func(request, election, *args, **kw) ...
▼ Local vars
Variable Value
args
() checks
{'frozen': False} election
<Election: Election object>
election_uuid
u'a37d4358-b3d1-11df-94ac-12313f025959'
func
kw
{} request
, POST:<QueryDict: {u'csrf_token':
[u'2fd5275c-f039-4a7b-adb5-55a1c81e4b89']}>,
COOKIES:{'sessionid': '4cd10649366b6f96afdc1444f0e44b67'},
META:{'CONTENT_LENGTH': '47', 'CONTENT_TYPE':
'application/x-www-form-urlencoded', 'DOCUMENT_ROOT':
'/web/helios-server', 'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT':
'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'HTTP_CACHE_CONTROL':
'max-age=0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=4cd10649366b6f96afdc1444f0e44b67', 'HTTP_HOST':
'vote.heliosvoting.org', 'HTTP_ORIGIN': 'http://vote.heliosvoting.org',
'HTTP_REFERER': 'http://vote.heliosvoting.org/helios/elections/a37d4358-b3d1-11df-94...,
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US)
AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.36
Safari/534.3', 'PATH': '/usr/local/bin:/usr/bin:/bin', 'PATH_INFO':
u'/helios/elections/a37d4358-b3d1-11df-94ac-12313f025959/freeze',
'PATH_TRANSLATED':
'/web/helios-server/django.wsgi/helios/elections/a37d4358-b3d1-11df-94ac-12313f025959/freeze',
'QUERY_STRING': '', 'REMOTE_ADDR': '67.190.100.88', 'REMOTE_PORT':
'40728', 'REQUEST_METHOD': 'POST', 'REQUEST_URI':
'/helios/elections/a37d4358-b3d1-11df-94ac-12313f025959/freeze',
'SCRIPT_FILENAME': '/web/helios-server/django.wsgi', 'SCRIPT_NAME':
u'', 'SERVER_ADDR': '10.166.90.167', 'SERVER_ADMIN': 'webmaster@heliosvoting.org',
'SERVER_NAME': 'vote.heliosvoting.org', 'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SIGNATURE': '
user
<User: User object>
/web/helios-server/helios/views.py in one_election_freeze
election.freeze() ...
▼ Local vars
Variable Value
election
<Election: Election object>
issues
[] request
, POST:<QueryDict: {u'csrf_token':
[u'2fd5275c-f039-4a7b-adb5-55a1c81e4b89']}>,
COOKIES:{'sessionid': '4cd10649366b6f96afdc1444f0e44b67'},
META:{'CONTENT_LENGTH': '47', 'CONTENT_TYPE':
'application/x-www-form-urlencoded', 'DOCUMENT_ROOT':
'/web/helios-server', 'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT':
'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'HTTP_CACHE_CONTROL':
'max-age=0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=4cd10649366b6f96afdc1444f0e44b67', 'HTTP_HOST':
'vote.heliosvoting.org', 'HTTP_ORIGIN': 'http://vote.heliosvoting.org',
'HTTP_REFERER': 'http://vote.heliosvoting.org/helios/elections/a37d4358-b3d1-11df-94...,
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US)
AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.36
Safari/534.3', 'PATH': '/usr/local/bin:/usr/bin:/bin', 'PATH_INFO':
u'/helios/elections/a37d4358-b3d1-11df-94ac-12313f025959/freeze',
'PATH_TRANSLATED':
'/web/helios-server/django.wsgi/helios/elections/a37d4358-b3d1-11df-94ac-12313f025959/freeze',
'QUERY_STRING': '', 'REMOTE_ADDR': '67.190.100.88', 'REMOTE_PORT':
'40728', 'REQUEST_METHOD': 'POST', 'REQUEST_URI':
'/helios/elections/a37d4358-b3d1-11df-94ac-12313f025959/freeze',
'SCRIPT_FILENAME': '/web/helios-server/django.wsgi', 'SCRIPT_NAME':
u'', 'SERVER_ADDR': '10.166.90.167', 'SERVER_ADMIN': 'webmaster@heliosvoting.org',
'SERVER_NAME': 'vote.heliosvoting.org', 'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SIGNATURE': '
/web/helios-server/helios/models.py in freeze
combined_pk = combined_pk * t.public_key ...
▼ Local vars
Variable Value
combined_pk
None
self
<Election: Election object>
t
<Trustee: Trustee object>
trustees
[<Trustee: Trustee object>, <Trustee: Trustee object>]
Request information
GET
No GET data
POST
Variable Value
csrf_token
u'2fd5275c-f039-4a7b-adb5-55a1c81e4b89'
FILES
No FILES data
COOKIES
Variable Value
sessionid
'4cd10649366b6f96afdc1444f0e44b67' META
Variable Value
CONTENT_LENGTH
'47' CONTENT_TYPE
'application/x-www-form-urlencoded' DOCUMENT_ROOT
'/web/helios-server' GATEWAY_INTERFACE
'CGI/1.1' HTTP_ACCEPT
'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5'
'ISO-8859-1,utf-8;q=0.7,*;q=0.3'
'gzip,deflate,sdch'
'en-US,en;q=0.8'
'max-age=0' HTTP_CONNECTION
'keep-alive' HTTP_COOKIE
'sessionid=4cd10649366b6f96afdc1444f0e44b67' HTTP_HOST
'vote.heliosvoting.org' HTTP_ORIGIN
'http://vote.heliosvoting.org'
HTTP_REFERER
'http://vote.heliosvoting.org/helios/elections/a37d4358-b3d1-11df-94...'
'Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3
(KHTML, like Gecko) Chrome/6.0.472.36 Safari/534.3' PATH
'/usr/local/bin:/usr/bin:/bin' PATH_INFO
u'/helios/elections/a37d4358-b3d1-11df-94ac-12313f025959/freeze'
PATH_TRANSLATED
'/web/helios-server/django.wsgi/helios/elections/a37d4358-b3d1-11df-94ac-12313f025959/freeze'
QUERY_STRING
'' REMOTE_ADDR
'67.190.100.88' REMOTE_PORT
'40728' REQUEST_METHOD
'POST' REQUEST_URI
'/helios/elections/a37d4358-b3d1-11df-94ac-12313f025959/freeze'
SCRIPT_FILENAME
'/web/helios-server/django.wsgi' SCRIPT_NAME
u''
SERVER_ADDR
'10.166.90.167' SERVER_ADMIN
'webmaster@heliosvoting.org'
SERVER_NAME
'vote.heliosvoting.org' SERVER_PORT
'80' SERVER_PROTOCOL
'HTTP/1.1' SERVER_SIGNATURE
'
'Apache/2.2.14 (Ubuntu)' mod_wsgi.application_group
'ip-10-166-90-167.us-west-1.compute.internal|' mod_wsgi.callable_object
'application' mod_wsgi.listener_host
'' mod_wsgi.listener_port
'80' mod_wsgi.process_group
'' mod_wsgi.reload_mechanism
'0' mod_wsgi.script_reloading
'1' mod_wsgi.version
(2, 8) wsgi.errors
<mod_wsgi.Log object at 0xb6cb2640>
wsgi.file_wrapper
<built-in method file_wrapper of mod_wsgi.Adapter object at 0xb6d3f8d8>
wsgi.input
<mod_wsgi.Input object at 0xb8a1c7a0>
wsgi.multiprocess
True
wsgi.multithread
False
wsgi.run_once
False
wsgi.url_scheme
'http' wsgi.version
(1, 0) Settings
Using settings module settings
Setting Value
{} ADMINS
('Ben Adida', 'ben@adida.net')
ADMIN_FOR
()
'/media/'
() APPEND_SLASH
True
AUTHENTICATION_BACKENDS
('django.contrib.auth.backends.ModelBackend',)
None
['password', 'facebook', 'twitter', 'google', 'yahoo']
'server_ui/templates/base.html' BANNED_IPS
() BROKER_HOST
'localhost' BROKER_PASSWORD
'********************' BROKER_PORT
5672
BROKER_USER
'guest' BROKER_VHOST
'/' CACHE_BACKEND
'locmem://'
''
600
False
None
0
None
None
DATABASE_ENGINE
'postgresql_psycopg2' DATABASE_HOST
'' DATABASE_NAME
'helios' DATABASE_OPTIONS
{} DATABASE_PASSWORD
'********************' DATABASE_PORT
'' DATABASE_USER
'helios' DATETIME_FORMAT
'N j, Y, P' DATE_FORMAT
'N j, Y' DEBUG
True
False
DEFAULT_CHARSET
'utf-8'
'text/html'
'django.core.files.storage.FileSystemStorage'
'Helios Voting'
'' DEFAULT_TABLESPACE
''
() EMAIL_HOST
'localhost'
'********************'
'' EMAIL_PORT
25
'[Django] '
False
'ded4f7705879a75f8d3b18eb776eb2ab'
'********************'
'129275817112381' FILE_CHARSET
'utf-8'
('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler')
2621440
None
None
FIXTURE_DIRS
() FOOTER_LINKS
[] FOOTER_LOGO
False
None
False
'server_ui/templates/base.html'
True
True
('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')
('/cgi-bin/', '/vti_bin', '/vti_inf')
INSTALLED_APPS
['django.contrib.contenttypes', 'django.contrib.sessions',
'django.contrib.sites', 'djcelery', 'auth', 'helios', 'server_ui']
INTERNAL_IPS
() LANGUAGES
(('ar', 'Arabic'), ('bn', 'Bengali'), ('bg', 'Bulgarian'), ('ca',
'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'),
('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('es',
'Spanish'), ('et', 'Estonian'), ('es-ar', 'Argentinean Spanish'),
('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr',
'French'), ('ga', 'Irish'), ('gl', 'Galician'), ('hu',
'Hungarian'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr',
'Croatian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja',
'Japanese'), ('ka', 'Georgian'), ('ko', 'Korean'), ('km', 'Khmer'),
('kn', 'Kannada'), ('lv', 'Latvian'), ('lt', 'Lithuanian'), ('mk',
'Macedonian'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('pl',
'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'),
('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl',
'Slovenian'), ('sr', 'Serbian'), ('sv', 'Swedish'), ('ta',
'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'),
('uk', 'Ukrainian'), ('zh-cn', 'Simplified Chinese'), ('zh-tw',
'Traditional Chinese')) LANGUAGES_BIDI
('he', 'ar', 'fa') LANGUAGE_CODE
'en-us'
'django_language' LOCALE_PATHS
()
'/accounts/profile/' LOGIN_URL
'/auth/'
True
LOGOUT_URL
'/accounts/logout/' MANAGERS
('Ben Adida', 'ben@adida.net')
MEDIA_ROOT
'/web/helios-server/media/' MEDIA_URL
'' MIDDLEWARE_CLASSES
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')
'F j'
''
PREPEND_WWW
False
PROFANITIES_LIST
''
ROOT_PATH
'/web/helios-server' ROOT_URLCONF
'urls' SECRET_KEY
'********************'
'https://vote.heliosvoting.org'
False
SERVER_EMAIL
'Helios Voting system@heliosvoting.org'
1209600
None
'sessionid'
'/'
False
SESSION_ENGINE
'django.contrib.sessions.backends.db'
False
None
False
SETTINGS_MODULE
'settings' SITE_ID
1
SITE_TITLE
'Helios Election Server'
('django.core.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media') TEMPLATE_DEBUG
True
TEMPLATE_DIRS
('/web/helios-server', '/web/helios-server/templates')
TEMPLATE_LOADERS
('django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source')
''
None
None
None
TEST_RUNNER
'django.test.simple.run_tests' TIME_FORMAT
'P' TIME_ZONE
'America/Los_Angeles' TRANSACTIONS_MANAGED
False
'ERiofRlGRzkldmjTkzQYiQ'
'********************'
{'oauth_token': '', 'oauth_token_secret': '', 'screen_name': '', 'user_id': ''}
'we can direct-message you when the result has been computed in an election in which you participated'
'heliosvoting' URL_HOST
'http://vote.heliosvoting.org'
'Django/1.1.1 (http://www.djangoproject.com)'
USE_ETAGS
False
USE_I18N
True
'voters/%Y/%m/%d' WELCOME_MESSAGE
'Welcome to the Helios Election Server'
'F Y' You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.
Comments and changes to this ticket
-
Neal McBurnett August 29th, 2010 @ 08:48 PM
One odd thing about this election: the bulletin board doesn't show any ballot tracking numbers, though I've cast two ballots (using different logins). Is "-" a sign that a ballot was audited?
http://vote.heliosvoting.org/helios/elections/a37d4358-b3d1-11df-94...
A help screen for the bulletin board would seem useful.
-
Ben Adida August 30th, 2010 @ 07:19 PM
- Milestone set to v3.1
- State changed from new to resolved
The issue here is that one of your trustees didn't have a public key uploaded. I've added a fix for this that will roll out with v3.0.4 in a few days, so that you get a nice error message.
I have NO idea how your election managed to be frozen though, when it shouldn't have been with this error. That's a bit of a mystery I can't recreate, even with your election in production right now! Maybe try it again?
In any case, I took the liberty of manually unfreezing your election and turning OFF voter aliases: they don't work right now with open registration.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
the Helios Voting System