web2py 2.15.3 is OUT

485 views
Skip to first unread message

Massimo Di Pierro

unread,
Aug 7, 2017, 10:33:55 AM8/7/17
to web2py-users
Contains lots of small fixes. 
Many thanks to Leonel for taking care of many urgent issues in a hurry.

\
Massimo

黄祥

unread,
Aug 7, 2017, 8:45:17 PM8/7/17
to web2py-users
test the new version (web2py_src.zip) with the same code that work in previous version (2.15.2) got an error :

Internal error

Ticket issued: unknown

step i took :
cd
rm -rf ~/web2py/applications/test
cp -R ~/web2py/applications/welcome/ ~/web2py/applications/test
rsync -zavr ~/Programming/Python/Web2py/test ~/web2py/applications/
rsync -zavur ~/Programming/Python/Web2py/test ~/web2py/applications/

thanks and best regards,
stifan

黄祥

unread,
Aug 7, 2017, 9:36:57 PM8/7/17
to web2py-users
problems from 2.15.1 still exist
1. Minify problems still exist
models/db.py
response.optimize_js = 'concat,minify,inline'

Access :

Return :
Traceback (most recent call last):
  File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 219, in restricted
    exec(ccode, environment)
  File "<string>", line 36, in <module>
  File "/Users/MacBookPro/site/web2py/gluon/globals.py", line 503, in include_files
    time_expire)
  File "/Users/MacBookPro/site/web2py/gluon/cache.py", line 247, in __call__
    value = f()
  File "/Users/MacBookPro/site/web2py/gluon/globals.py", line 498, in call_minify
    self.optimize_js)
  File "/Users/MacBookPro/site/web2py/gluon/contrib/minify/minify.py", line 111, in minify
    contents = read_binary_file(abs_filename)
  File "/Users/MacBookPro/site/web2py/gluon/contrib/minify/minify.py", line 32, in read_binary_file
    f = open_py23(filename, 'r')
  File "/Users/MacBookPro/site/web2py/gluon/contrib/minify/minify.py", line 26, in open_py23
    f = open(filename, mode + 'b')
IOError: [Errno 2] No such file or directory: '/Users/MacBookPro/site/web2py/applications/mutualfunds/static/min.js'

2. before insert callback problem with required = True still exist

Leonel Câmara

unread,
Aug 8, 2017, 4:26:57 AM8/8/17
to web2py-users
stifan can you provide the application causing that unknown ticket error?

黄祥

unread,
Aug 8, 2017, 6:27:28 AM8/8/17
to web2py-users
already fixed leonel, the error caused by the sqlite database that already exist and fake_migrate settings (appears in terminal console that run web2py)

the different behaviour is in previous version an error will recorded in appadmin errors, while in latest version it appears in terminal console that run the web2py (python web2py.py)

黄祥

unread,
Aug 8, 2017, 7:01:26 AM8/8/17
to web2py-users
Internal error

Ticket issued: unknown

error shown in terminal (previous version shown in appadmin errors)
ERROR:web2py:Traceback (most recent call last):
  File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 219, in restricted
    exec(ccode, environment)
  File "/Users/MacBookPro/site/web2py/applications/scaffold/models/db.py", line 25, in <module>
    check_reserved = ['all'])
  File "/Users/MacBookPro/site/web2py/gluon/packages/dal/pydal/base.py", line 170, in __call__
    obj = super(MetaDAL, cls).__call__(*args, **kwargs)
  File "/Users/MacBookPro/site/web2py/gluon/packages/dal/pydal/base.py", line 475, in __init__
    "Failure to connect, tried %d times:\n%s" % (attempts, tb)
RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
  File "/Users/MacBookPro/site/web2py/gluon/packages/dal/pydal/base.py", line 455, in __init__
    self._adapter = adapter(**kwargs)
  File "/Users/MacBookPro/site/web2py/gluon/packages/dal/pydal/adapters/__init__.py", line 40, in __call__
    obj = super(AdapterMeta, cls).__call__(*args, **kwargs)
  File "/Users/MacBookPro/site/web2py/gluon/packages/dal/pydal/adapters/base.py", line 368, in __init__
    super(SQLAdapter, self).__init__(*args, **kwargs)
  File "/Users/MacBookPro/site/web2py/gluon/packages/dal/pydal/adapters/base.py", line 52, in __init__
    self.reconnect()
  File "/Users/MacBookPro/site/web2py/gluon/packages/dal/pydal/connection.py", line 152, in reconnect
    self.connection = self.connector()
  File "/Users/MacBookPro/site/web2py/gluon/packages/dal/pydal/adapters/sqlite.py", line 42, in connector
    return self.driver.Connection(self.dbpath, **self.driver_args)
OperationalError: unable to open database file

test using web2py scaffold (vue js + whoosh) appconfig.ini taken from welcome scaffolding app

solution
create databases folder

best regards,
stifan

Richard Vézina

unread,
Aug 8, 2017, 11:52:59 AM8/8/17
to web2py-users
Most of the time ticket unknown is the results of bad permissions settings if I recall..

Richard

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

黄祥

unread,
Aug 15, 2017, 5:53:22 PM8/15/17
to web2py-users
in 2.15.3, sometimes an error occured saying there is no app_name/languages/default.py 
solution : copy languages/default.py from 2.14.x version
question : is the file remove for a purpose ? checked on github, there is no file in welcome/languages/default.py 

Mirek Zvolský

unread,
Aug 17, 2017, 9:44:07 AM8/17/17
to web...@googlegroups.com
For me today, with 2.15.3:

1)
I had no file applications/admin/private/hosts.deny -> when manually created (empty file), admin works.

2)
This doesn't work for me in templates (was Ok in version from 2016):
{{=MARKMIN(T("**something bold** something more"))}}
This works:
{{=T("**something** something")}}
Error for the 1st case is 
  File "/home/www-data/web2py/gluon/restricted.py", line 219, in restricted
    exec(ccode, environment)
  File "<string>", line 113, in <module>
  File "/home/www-data/web2py/gluon/html.py", line 2791, in __init__
    self.text = to_bytes(text)
  File "/home/www-data/web2py/gluon/_compat.py", line 68, in to_bytes
    raise TypeError('Expected bytes')
TypeError: Expected bytes

Mirek Zvolský

unread,
Aug 17, 2017, 10:00:04 AM8/17/17
to web...@googlegroups.com
Hotfix for MARKMIN(T()) is bellow.
gluon/html.py
+empty string in 1st line of MARKMIN constructor.

But no idea what is broken with such stupid fix (py3,..)


class MARKMIN(XmlComponent):
"""
For documentation: http://web2py.com/examples/static/markmin.html
"""
def __init__(self,
text, extra=None, allowed=None, sep='p',
url=None, environment=None, latex='google',
autolinks='default',
protolinks='default',
class_prefix='',
id_prefix='markmin_',
**kwargs):
self.text = to_bytes(text + '') # hotfix 2.15.3: + ''




Dne čtvrtek 17. srpna 2017 15:44:07 UTC+2 Mirek Zvolský napsal(a):

Dave S

unread,
Aug 21, 2017, 10:36:56 PM8/21/17
to web2py-users

Looking at the setup scripts, the nginx-centos one doesn't seem to have been updated for a while ... refers to python 2.6 and centos 5.  Anybody find issues with running it on Centos 7 with python 2.7.x, x> 3 ?

(true confession ... one of my dev machines is Fedora 16 and Python 2.7.3, but I'm running with Rocket on that machine)

/dps
 

Dave S

unread,
Aug 22, 2017, 8:48:07 PM8/22/17
to web2py-users


On Monday, August 21, 2017 at 7:36:56 PM UTC-7, Dave S wrote:


On Monday, August 7, 2017 at 7:33:55 AM UTC-7, Massimo Di Pierro wrote:
Contains lots of small fixes. 
Many thanks to Leonel for taking care of many urgent issues in a hurry.

\
Massimo


Looking at the setup scripts, the nginx-centos one doesn't seem to have been updated for a while ... refers to python 2.6 and centos 5.  Anybody find issues with running it on Centos 7 with python 2.7.x, x> 3 ?


Oops, bash auto-complete helped me miss the C7 version of the script (and the C6, also).

Footnote:  AWS linux (house brand guest OS, as opposed to a distro guest like RHEL) uses both yum and upstart.
 

Daniel Vogel

unread,
Aug 24, 2017, 2:34:13 AM8/24/17
to web2py-users
Problems with umlaut äöü and db query (Column %s not found)

(1.)
Problems with umlaute ä ö ü, if a function with a view called inside a Wiki page.
Only with new created application on version 2.15.3.

Function in Wiki Page:
- @{component:activity/list_a.load}

View:
{{if count == 0:}}
{{=str(count)+' Datensätze gefunden...'}}
{{pass}}

Result:
0 Datensätze gefunden...

The same if I sue SQLFORM.grid.
Id    Vorname    Nachname    E-mail  
1    Wiki    Administrator äöü    wi...@muster.ch  

(2.)
Problems with a query from database.
On all applications after upgrade to 2.15.3. I tried also a scratch installation from git.

Error:

Traceback (most recent call last):
  File "/opt/web2py/gluon/restricted.py", line 219, in restricted
    exec(ccode, environment)
  File "<string>", line 10, in <module>
  File "/opt/web2py/gluon/sqlhtml.py", line 3411, in __init__
    "Column %s not found (SQLTABLE)" % colname)
KeyError: 'Column anmeldung.device not found (SQLTABLE)'

Query:
def liste_scout_manage():
    response.subtitle = 'IP Liste Scout Manage'
    rows = db(db.ipliste1.gruppe=='Scout Manage').select(orderby=db.ipliste1.device|db.ipliste1.adresse)
    response.view = 'ipliste1/liste_ip.html'
    return locals()

DB:
db.define_table('ipliste1',
                Field('device', requires=IS_IN_SET(['bck01','mgr01'],zero=None)),
                Field('hostname', requires=IS_NOT_EMPTY()),
                Field('adresse', unique=True),
                Field('gruppe', requires=IS_IN_SET(['Scout Data','Scout Backup','Scout Manage'],zero=None)),
                Field('service'),
                Field('info'),
                Field('bemerkungen'),
               )

Any solutions or need I go back with the web2py version?

Thanks, Daniel

黄祥

unread,
Aug 27, 2017, 8:16:19 PM8/27/17
to web2py-users
it seems response.js have a different behaviour in new version
e.g. (the same code work well in 2.14.6)
...
if form.process().accepted:
...
    target_response = "jQuery('#test .close').click(); jQuery('#test').get(0).reload()"
    response.js =  target_response
    #redirect(request.env.http_web2py_component_location, client_side = True)

in 2.14.6, after the form submited it automatically reload the web2py component and the page still responding, while in the latest version the modal is closed, the component data is reload with new value but the page is not responding, just have the dark silouette of the page, the solution is must refresh the page or append :
redirect(request.env.http_web2py_component_location, client_side = True)
is it normal or did i missed something in the latest version ?

Anthony

unread,
Aug 27, 2017, 9:13:44 PM8/27/17
to web2py-users
It's not clear how that would be related to response.js, as it appears the code returned via response.js is in fact being executed in the browser. It's hard to say what's going wrong in the browser without knowing more about the JS and what the DOM looks like at that point.

Anthony

Yoel Benitez Fonseca

unread,
Aug 28, 2017, 2:03:43 PM8/28/17
to web2py
Hi,

new copy of 2.15.3, create a model with a date Field - using SQLite,
in appadmin or a CRUD form the date widget don't show the year, just
the name of the day.

I come from 2.14.6, don't know if this is something related only to
2.15.3 or is that i'm missing something.
> --
> 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+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Msc. Yoel Benítez Fonseca
Dpto. Informática. Redacción Adelante
http://www.adelante.cu/

Anthony

unread,
Aug 28, 2017, 3:01:16 PM8/28/17
to web2py-users
On Monday, August 28, 2017 at 2:03:43 PM UTC-4, Yoel Benitez Fonseca wrote:
Hi,

new copy of 2.15.3, create a model with a date Field - using SQLite,
in appadmin or a CRUD form the date widget don't show the year, just
the name of the day.

How is this related to the current thread?
Reply all
Reply to author
Forward
0 new messages