I was running my application and got this error
{
<type 'exceptions.ImportError'> cannot import name Set
Version
web2py™ Version 2.10.4-stable+timestamp.2015.04.26.15.11.54
Python Python 2.7.3: /usr/bin/python (prefix: /usr)
Traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
Traceback (most recent call last):
File "/home/www-data/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
File "/home/www-data/web2py/applications/omniavx_cxn/controllers/valuecache.py", line 6897, in <module>
File "/home/www-data/web2py/gluon/globals.py", line 393, in <lambda>
self._caller = lambda f: f()
File "/home/www-data/web2py/applications/omniavx_cxn/controllers/valuecache.py", line 6584, in browse_bacct_callback
from plugin_PowerGrid.CallBack import CallBack
File "/home/www-data/web2py/gluon/custom_import.py", line 95, in custom_importer
return base_importer(pname, globals, locals, fromlist, level)
File "/home/www-data/web2py/gluon/custom_import.py", line 134, in __call__
result = NATIVE_IMPORTER(name, globals, locals, fromlist, level)
File "applications/omniavx_cxn/modules/plugin_PowerGrid/CallBack.py", line 41, in <module>
from gluon.dal import Table ,Query, Set, Rows, Row
ImportError: cannot import name Set
}
same code produced no error in earlier version of web2py
line 15 of web2py/gluon/dal.py is
{
from pydal.objects import Row, Rows, Table, Query, Expression
}
replacing that with
{
from pydal.objects import Row, Rows, Table, Query, Set, Expression
}
solves the problem
Running readline.parse_and_bind("bind ^I rl_complete") makes the letter "b" stop working on the console. This patch solves the issue and correctly enables tab completition on OSX.
Not doing this was raising an exception :
Traceback (most recent call last):
File /base/data/home/apps/e~sacred-bonus-88417/1.384178859090314065/gluon/restricted.py, line 227, in restricted
exec ccode in environment
File /base/data/home/apps/e~sacred-bonus-88417/1.384178859090314065/applications/foundit/controllers/default.py, line 127, in <module>
File /base/data/home/apps/e~sacred-bonus-88417/1.384178859090314065/gluon/globals.py, line 393, in <lambda>
self._caller = lambda f: f()
File /base/data/home/apps/e~sacred-bonus-88417/1.384178859090314065/applications/foundit/controllers/default.py, line 34, in user
return dict(form=auth())
File /base/data/home/apps/e~sacred-bonus-88417/1.384178859090314065/gluon/tools.py, line 1595, in __call__
return getattr(self, args[0])()
File /base/data/home/apps/e~sacred-bonus-88417/1.384178859090314065/gluon/tools.py, line 3272, in request_reset_password
if self.email_reset_password(user):
File /base/data/home/apps/e~sacred-bonus-88417/1.384178859090314065/gluon/tools.py, line 3296, in email_reset_password
message=self.messages.reset_password % d):
File /base/data/home/apps/e~sacred-bonus-88417/1.384178859090314065/gluon/tools.py, line 798, in send
subject=subject, body=text, **xcc)
File /base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/mail.py, line 402, in send_mail
message.send(make_sync_call=make_sync_call)
File /base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/mail.py, line 1108, in send
message = self.ToProto()
File /base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/mail.py, line 1350, in ToProto
message = super(EmailMessage, self).ToProto()
File /base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/mail.py, line 1046, in ToProto
message.set_subject(_to_str(self.subject))
File cpp_message.pyx, line 124, in cpp_message.SetScalarAccessors.Setter (third_party/apphosting/python/protobuf/proto1/cpp_message.cc:2229)
TypeError: <class 'gluon.languages.lazyT'> has type <class 'gluon.languages.lazyT'>, but expected one of: str, unicode
response.include_files is now cleaner and easier to maintain
You can specify a tuple of (type, url) to include external assets
without extension (such as the usecase described in #628)
Added tests for include_files, that was never included in CI tests