pybay/pybay_old

Workout Python 3.5 compatibility for the CFP

Closed this issue · 1 comments

Currently we are having this issue in the CFP:

AttributeError at /cfp

module 'random' has no attribute 'choices'

Request Method: 	POST
Request URL: 	http://pyconsf.com/cfp
Django Version: 	1.9.2
Exception Type: 	AttributeError
Exception Value: 	

module 'random' has no attribute 'choices'

Exception Location: 	./pybay/forms.py in save_to_models, line 42
Python Executable: 	/data/pybay/venv/bin/uwsgi
Python Version: 	3.5.2
Python Path: 	

['.',
 '',
 '/usr/lib/python35.zip',
 '/usr/lib/python3.5',
 '/usr/lib/python3.5/plat-x86_64-linux-gnu',
 '/usr/lib/python3.5/lib-dynload',
 '/data/pybay/venv/lib/python3.5/site-packages']

Server time: 	Fri, 21 Apr 2017 21:00:10 -0400```

random.choices is a new method introduced on Python 3.6.
Issue solved on gh-10 as the server uses Python 3.5