Hi,
Very new user here, trying to understand how web2py is supposed to be used,
using Windows 7 and the web2py source distribution.
I've copied the supplied options_std.py to options.py, and then tried to
run web2py as follows:
C:\web2py>python web2py.py -L options.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2013
Version 2.4.5-stable+timestamp.2013.03.18.22.46.22
Database drivers available: SQLite(sqlite3), MySQL(pymysql), PostgreSQL(
pg8000),
MSSQL(pyodbc), DB2(pyodbc), Teradata(pyodbc), Ingres(pyodbc), IMAP(imaplib)
Traceback (most recent call last):
File "web2py.py", line 27, in <module>
gluon.widget.start(cron=True)
File "C:\web2py\gluon\widget.py", line 1228, in start
if (len(options.ssl_certificate) > 0) or (len(options.ssl_private_key) >
0):
TypeError: object of type 'NoneType' has no len()
Note, no changes have yet been made to options.py so it appears as provided
options.py (or rather, options_std.py) is not valid for the current web2py
service? It appears this may be because of the "None" entries on these 2
lines in options.py:
ssl_certificate = None # 'ssl_certificate.pem' # ## path to certificate
file
ssl_private_key = None # 'ssl_private_key.pem' # ## path to private key
file
Some googling suggests these lines previous had blank strings assigned, and
changing these lines to
ssl_certificate = '' # 'ssl_certificate.pem' # ## path to certificate file
ssl_private_key = '' # 'ssl_private_key.pem' # ## path to private key file
allows the server to start:
C:\web2py>python web2py.py -L options.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2013
Version 2.4.5-stable+timestamp.2013.03.18.22.46.22
Database drivers available: SQLite(sqlite3), MySQL(pymysql), PostgreSQL(
pg8000),
MSSQL(pyodbc), DB2(pyodbc), Teradata(pyodbc), Ingres(pyodbc), IMAP(imaplib)
please visit:
http://127.0.0.1/
use "kill -SIGTERM 1128" to shutdown the web2py server
Is this a bug? Why was "None" introduced into options.py if it clearly
breaks the server?
I must admit I'm finding it a bit unsettling that 15 minutes into an
exploration into web2py I'm finding what appears to be a blatantly obvious
bug in the code and am posting to the web2py-users group about it. Can
someone put my mind at ease?
Finally I have a question regarding options.py: Is it loaded/used if you
do not specify the -L option and do not specify any command line arguments
either? (If not, why not?)
Thanks in advance,
Walter
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.