[web2py] web2py on mac from source
Hi, I'm playing a bit with web2py, it is agreat framework, however theres some unclear thins to me: the source edito from binary dist has some more features than the source dist, like fullscreen, search ... even more I user vimperator extention for firefox, which permit me to open the remote python file locally, this work fine with the binary (version 1.99.7) dist and not at all with the source dist and the binary dist ( ver. 2.9 ) . What I noticed: when startin web2py from source I recieved this message: osascript[68476:607] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find: /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers. 50:86: execution error: System Events got an error: Can’t get process 1 whose unix id = 68470. Invalid index. (-1719) After googling for possibles solutions, I found a reccomandation to update the Adobe Unit Types.osax to the newest version and after I've done that now the warning message is: osascript[70570:607] Cannot find executable for CFBundle 0x10011a110 (not loaded) osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers. I really don't know what it is, I suppose that that could be the cause for the bab functioning of the editor. I really love vim and I really like to find a solution to this little problem. Any help will be appreciated. Xaver --
[web2py] DAL, legacy Database, field name as python keyword
Hi, I'm using web2py DAL for a legacy database which has a Table users with a field named "pass". I've used the "rname" to alias the "pass" field. unfortunately doesn't work. db.define_table('users', Field('uid', 'integer'), Field('name','string'), Field('pass', rname='passwd'), Field('mail','string'), Field('theme','string'), Field('signature','string'), Field('signature_format','string'), Field('created','integer'), Field('access','integer'), Field('login','integer'), Field('status','integer'), Field('timezone','string'), Field('language','string'), Field('picture','integer'), Field('init','string'), Field('data','blob'), primarykey=['uid'], migrate=False) Traceback (most recent call last): File "/home/sas/PycharmProjects/pydal/index.py", line 8, in Field('pass', rname='passwd'), File "/home/sas/virtualpy/local/lib/python2.7/site-packages/pydal/objects.py", line 1438, in __init__ 'use rname for "funny" names' % fieldname) SyntaxError: Field: invalid field name: pass, use rname for "funny" names Another question; I do I define with(define_table) only some field of the DB-Table. Because commenting out the "pass" field it throws many errors which I do not completely understand: Traceback (most recent call last): File "/home/sas/PycharmProjects/pydal/index.py", line 41, in users = db().select(db.users.ALL) File "/home/sas/virtualpy/local/lib/python2.7/site-packages/pydal/objects.py", line 2020, in select return adapter.select(self.query, fields, attributes) File "/home/sas/virtualpy/local/lib/python2.7/site-packages/pydal/adapters/base.py", line 1296, in select return self._select_aux(sql,fields,attributes) File "/home/sas/virtualpy/local/lib/python2.7/site-packages/pydal/adapters/base.py", line 1277, in _select_aux return processor(rows,fields,self._colnames,cacheable=cacheable) File "/home/sas/virtualpy/local/lib/python2.7/site-packages/pydal/adapters/base.py", line 1767, in parse for row in rows] File "/home/sas/virtualpy/local/lib/python2.7/site-packages/pydal/adapters/base.py", line 1677, in _parse value = self.parse_value(value, ft, blob_decode) File "/home/sas/virtualpy/local/lib/python2.7/site-packages/pydal/adapters/base.py", line 1527, in parse_value return self.parsemap[key](value,field_type) File "/home/sas/virtualpy/local/lib/python2.7/site-packages/pydal/adapters/base.py", line 1592, in parse_blob return base64.b64decode(str(value)) File "/usr/lib/python2.7/base64.py", line 76, in b64decode raise TypeError(msg) TypeError: Incorrect padding Thks. Xaver -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] web2py uwsgi
Hi, I'm on os x 10.6.8 machine and I'm trying to run web2py with uwsgi. I'm following the tutorial on http://uwsgi-docs.readthedocs.org/en/latest/WSGIquickstart.html. Downloaded and compiled uwsgi. when I run uwsgi with the ini file I'm not able to connect to the admin interface. In the browser I give https://localhost:9090/admin/default/index If I run ./uwsgi --http :9090 --wsgi-file /Users/xaver/web2py/web2py/src/wsgihandler.py --master --process 4 --threads 2 --stats 127.0.0.1:9191 it generate an error ticket which last lines are: S'Traceback (most recent call last):\n File "/Users/xaver/web2py/web2py/src/gluon/restricted.py", line 217, in restricted\nexec ccode in environment\n File "/Users/saverioscavelli/web2py/web2py/src/applications/admin/models/access.py", line 29, in \nport = int(request.env.server_port or 0)\nValueError: invalid literal for int() with base 10: \'9090,foobar.crt,foobar.key\'\n' Another problem I'm having is with the virtualenv. In the above cited tutorial it says that is enough to simple make an entry in the iniffile eg. virtualenv=/path/to/the/virtualenv and uwsgi will find all the needed stuff, but that doesn't work for me: uWSGI http bound on :9090,foobar.crt,foobar.key fd 4 uwsgi socket 0 bound to TCP address 127.0.0.1:56782 (port auto-assigned) fd 3 Python version: 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] Set PythonHome to /Users/xaver/web2py/web2py/ 'import site' failed; use -v for traceback this is the output after running make: pcre = True kernel = Darwin malloc = libc execinfo = False ifaddrs = True ssl = True zlib = True locking = osx_spinlock plugin_dir = . timer = kqueue yaml = embedded json = False filemonitor = kqueue routing = True debug = False capabilities = False xml = libxml2 event = kqueue How you can see ssl is compiled with. and this is my uwsgi ini file: [uwsgi] http = :9090,foobar.crt,foobar.key chdir = /Users/xaver/web2py/web2py/src/ module = wsgihandler master = true processes = 8 enable-threads = true any ideas? thks. xaver -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] web2py uwsgi
On Sunday, March 2, 2014 1:58:31 PM UTC+1, Roberto De Ioris wrote: > > > > Hi, > > > > I'm on os x 10.6.8 machine and I'm trying to run web2py with uwsgi. > > I'm following the tutorial on > > http://uwsgi-docs.readthedocs.org/en/latest/WSGIquickstart.html. > > Downloaded and compiled uwsgi. > > when I run uwsgi with the ini file I'm not able to connect to the admin > > interface. > > In the browser I give https://localhost:9090/admin/default/index > > > > If I run ./uwsgi --http :9090 --wsgi-file > > /Users/xaver/web2py/web2py/src/wsgihandler.py --master --process 4 > > --threads 2 --stats 127.0.0.1:9191 > > it generate an error ticket which last lines are: > > S'Traceback (most recent call last):\n File > > "/Users/xaver/web2py/web2py/src/gluon/restricted.py", line 217, in > > restricted\nexec ccode in environment\n File > > > "/Users/saverioscavelli/web2py/web2py/src/applications/admin/models/access.py", > > > > line 29, in \nport = int(request.env.server_port or > > 0)\nValueError: invalid literal for int() with base 10: > > \'9090,foobar.crt,foobar.key\'\n' > > > > Another problem I'm having is with the virtualenv. In the above cited > > tutorial it says that is enough to simple make an entry in the iniffile > > eg. virtualenv=/path/to/the/virtualenv and uwsgi will find all the > needed > > stuff, but that doesn't work for me: > > > > uWSGI http bound on :9090,foobar.crt,foobar.key fd 4 > > uwsgi socket 0 bound to TCP address 127.0.0.1:56782 (port > auto-assigned) > > fd > > 3 > > Python version: 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 > > (Apple Inc. build 5646)] > > Set PythonHome to /Users/xaver/web2py/web2py/ > > 'import site' failed; use -v for traceback > > > > > > this is the output after running make: > > pcre = True > > kernel = Darwin > > malloc = libc > > execinfo = False > > ifaddrs = True > > ssl = True > > zlib = True > > locking = osx_spinlock > > plugin_dir = . > > timer = kqueue > > yaml = embedded > > json = False > > filemonitor = kqueue > > routing = True > > debug = False > > capabilities = False > > xml = libxml2 > > event = kqueue > > > > How you can see ssl is compiled with. > > > > and this is my uwsgi ini file: > > > > [uwsgi] > > http = :9090,foobar.crt,foobar.key > > it is https not http. certificates on plain http have no meaning > > Hi, thks. for the answer. But please be a bit more verbose. Not matter how I call it: over http or https I can't acces the admin interface of web2py mybe the problem lays to the web2py security restriction. Tkhs. xaver > > > -- > Roberto De Ioris > http://unbit.it > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.