web2py 2.6.1 is OUT - IMPORTANT READ

1,056 views
Skip to first unread message

Massimo Di Pierro

unread,
Sep 12, 2013, 6:27:37 PM9/12/13
to web...@googlegroups.com
Web2py 2.6.1 is finally OUT. It needs some more testing.

READ BELOW BEFORE UPGRADING

!!!! Attention all users: For pre 2.6 applications to work with web2py >=2.6, you must copy static/js/web2py.js, controllers/appadmin.py, and views/appadmin.html from the welcome app to your own apps (all of them).

!!!! Attention production users: The updated handlers and examples are in handlers/ and examples/. The updated ones will not override the existing ones. To use the new ones it is not sufficient to upgrade web2py, you also need to copy the desired handler/example in the root web2py/ folder.

!!!! Attention MySQL users: The length of string fields changed from 255 to 512 bytes. If you have migrations enabled this will trigger a large migration. To prevent it, first set migrate_enabled=False, upgrade, check everything is ok, then add length=255 to your string Fields, then re-enable migrations with migrate_enabled=True if needed.

- better directory structure: handlers/ extras/ examples/
- better MongoDb support, thanks Alan
- better Admin editor interface, thanks Paolo, Roberto (codemirror 3), and Lightdot
- better layout.html and web2py_bootstrap.css, thanks Paolo
- refactored web2py.js makes code more readable, thanks Niphlod
- compute fields can depend on other compute(d) fields
- more functions in appadmin (/manage/auth), thanks Anthony
- support for CAST in SQL generation
- new API jQuery('#component').reload()
- new API rows.render()
- new API table.field.referent, table._references
- new API db(...).validate_and_update(...)
- new API Wiki(..., force_render=True) renders the page source again instead of using cached
- Wiki now automatically parses named component arguments @{f:a=1,b='twp',c=variable}
- auth.get_or_create_user(login=False)
- auth = Auth(crsf_protection = False) prevents creating sessions in login/register forms.
- enable multiple renderers in wiki, thanks Alan
- log messages from Auth are no longer translated (for speed and readability)
- update jQuery mobile to 1.3.1
- reduced memory footprint by conditionally loading Tk
- faster pbkdf2 uses OpenSSL, thanks Michele
- many speed improvements, thanks Michele
- better session logic, prevents false positive when detecting session changes.
- scripts/import_static.py converts a static site to a web2py app (experimental)
- support for new http error code 451
- profiler saves dump in dir, thanks Niphlod
- upgraded pyfpdf, thanks Mariano
- gluon/contrib/pdfinvoice.py for generating PDF invoices (assumes reportlab)
- no more double submission of forms (even without crsf protection), thanks Niphlod
- speedup for define_table, thanks Michele
- settings.cfg to admin, thanks Paolo
- many bugs fixed, thanks Niphlod, Michele, Roberto, Jonathan, and many others

Michele Comitini

unread,
Sep 12, 2013, 7:53:50 PM9/12/13
to web...@googlegroups.com
+1

Thank you Massimo!

Massimo Di Pierro

unread,
Sep 12, 2013, 8:51:31 PM9/12/13
to web...@googlegroups.com
Thank you. The majority of the improvements in this version come from you (Michele) and niphlod (Simone).

Massimo

Roberto Perdomo

unread,
Sep 12, 2013, 8:55:38 PM9/12/13
to web...@googlegroups.com

Great news!.

Thanks to everybody for do a better web2py every day.

--
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/groups/opt_out.

Massimo Di Pierro

unread,
Sep 12, 2013, 11:02:35 PM9/12/13
to web...@googlegroups.com
And thanks to you Roberto, who also contributed with many patches!

Vinicius Assef

unread,
Sep 13, 2013, 12:31:12 AM9/13/13
to web2py
congrats, guys.

It's becoming much better.

Tim Richardson

unread,
Sep 13, 2013, 4:56:46 AM9/13/13
to web...@googlegroups.com
I've been using it for about a month on one Windows production site with ms-sqlserver, and it's a great release. So many improvements and even more fun to use. Thanks.

Javier Pepe

unread,
Sep 13, 2013, 7:40:19 AM9/13/13
to web...@googlegroups.com
+1


On Fri, Sep 13, 2013 at 5:56 AM, Tim Richardson <t...@growthpath.com.au> wrote:
I've been using it for about a month on one Windows production site with ms-sqlserver, and it's a great release. So many improvements and even more fun to use. Thanks.

--

Javier Pepe

unread,
Sep 13, 2013, 7:49:10 AM9/13/13
to web...@googlegroups.com
I'm try to use new version, but missing settings.cfg file.

In that directory has to put it and what format must have?

Thansk

Javier Pepe

unread,
Sep 13, 2013, 7:59:41 AM9/13/13
to web...@googlegroups.com
Now work

The update from admin interface not end correctly.

Unzip file over actual folder, restart and work!!!



Richard Vézina

unread,
Sep 13, 2013, 10:57:52 AM9/13/13
to web2py-users
Many thanks to all contributors!

Just one question... I read on here about something of "no more inline javascript" and that will bring complaints from users... Does I have to refactor anything about the way I pass javascript between controller and view related to this discussed change by Niphold?

Thanks

Richard

Anthony

unread,
Sep 13, 2013, 11:04:44 AM9/13/13
to web...@googlegroups.com
I don't think you'll have to make any changes. I believe the reference to inline Javascript was related to framework widgets that were using inline JS, which has now been moved to web2py.js.

Anthony

Richard Vézina

unread,
Sep 13, 2013, 11:50:20 AM9/13/13
to web2py-users
Thanks for the answer...

Richard

Niphlod

unread,
Sep 13, 2013, 11:57:29 AM9/13/13
to web...@googlegroups.com
yep. the "complaints" we expect are from people forgetting to update web2py.js in their application. Although this was never stated explicitely, there are parts of the application that belongs really to the framework itself (appadmin, web2py.js, etc. what is clearly stated in the changelog). Until now this "update" was only strictly required for particular occasions. From now on instead it will be enforced as a best practice.

Richard Vézina

unread,
Sep 13, 2013, 12:04:14 PM9/13/13
to web2py-users
Ok, I thought the change you were discussing were kind of backward issue with the way we write js in web2py and pass it to the view. Yes, I always update the files you talk about, since I get bitte in the pass because of not updating them :)

Thanks for clarify.

Richard


Matthew Spence

unread,
Sep 13, 2013, 3:50:17 PM9/13/13
to
Hi all-

I'm very excited about the upgrade. I'm deployed on PythonAnywhere, and when I clicked on the button to "upgrade now to Version 2.6.1", it looks like it downloads, but then suddenly I get "Internal error. Ticket issued admin/...." and now my admin interface does not work. (The site still works, though, and so does appadmin  -- but no main admin interface.)

I went in to PythonAnywhere's filesystem and changed the files as the changelog requested (copying static/js/web2py.js, controllers/appadmin.py, and views/appadmin.html from the welcome app to my apps), and I tried reloading the site after making those changes, but I still have the problem.

edit: I also tried this: I made a completely fresh install of web2py from the auto tool on PythonAnywhere, then tried upgrading web2py using the button on the admin site. Same issue (even though it only had the "stock" apps of welcome, examples, and admin).

Any help would be much appreciated! Thanks!!

-Matt

Massimo Di Pierro

unread,
Sep 13, 2013, 4:15:53 PM9/13/13
to web...@googlegroups.com
Can you explain better? The file should be created if not there.

Massimo Di Pierro

unread,
Sep 13, 2013, 8:48:30 PM9/13/13
to web...@googlegroups.com
OK. 2.6.2 was just released and this problem should now be fixed. Thanks for reporting it.


On Friday, 13 September 2013 12:09:41 UTC-5, Matthew Spence wrote:
Hi all-

I'm very excited about the upgrade. I'm deployed on PythonAnywhere, and when I clicked on the button to "upgrade now to Version 2.6.1", it looks like it downloads, but then suddenly I get "Internal error. Ticket issued admin/...." and now my admin interface does not work. (The site still works, though, and so does appadmin  -- but no main admin interface.)

I went in to PythonAnywhere's filesystem and changed the files as the changelog requested (copying static/js/web2py.js, controllers/appadmin.py, and views/appadmin.html from the welcome app to my apps), and I tried reloading the site after making those changes, but I still have the problem.

edit: I also tried this: I made a completely fresh install of web2py from the auto tool on PythonAnywhere, then tried upgrading web2py using the button on the admin site. Same issue (even though it only had the "stock" apps of welcome, examples, and admin).

Any help would be much appreciated! Thanks!!

-Matt

On Thursday, September 12, 2013 6:27:37 PM UTC-4, Massimo Di Pierro wrote:

Ariya Oaum-aram

unread,
Sep 13, 2013, 9:11:02 PM9/13/13
to web...@googlegroups.com
Dear Massimo,

In my case, I upgrade from 2.5.1 to 2.6.1 to my web2py.app last night (Bangkok). Then I restart rocket server, after input password and start, there is a dialog box show this message => dlsym(0x7fff5fc43cc8, CCKeyDerivationPBKDF): symbol not found. I do download 2.6.2 but still got this message.

And in my production server running on Ubuntu/Apache. Now admin interface is error, so how do i re upgrade.

Thank you very much
Ariya


เมื่อ วันศุกร์ที่ 13 กันยายน ค.ศ. 2013, 5 นาฬิกา 27 นาที 37 วินาที UTC+7, Massimo Di Pierro เขียนว่า:

samuel bonill

unread,
Sep 13, 2013, 11:09:07 PM9/13/13
to web...@googlegroups.com
good news....

Thanks to everybody and massimo for do a better web2py every day.

samuel bonill

unread,
Sep 13, 2013, 11:24:11 PM9/13/13
to web...@googlegroups.com
I think that the best way for update is downloaded de source code in the website....
http://web2py.com/init/default/download


2013/9/13 samuel bonill <pytho...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/dUX6XAID7Ks/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.

Massimo Di Pierro

unread,
Sep 14, 2013, 12:36:49 AM9/14/13
to web...@googlegroups.com
Which version gives you the ticket (2.6.1 or 2.6.2, windows, mac or source_ which os version? which python version?. Can you email me the ticket?

massimo

黄祥

unread,
Sep 14, 2013, 2:53:17 AM9/14/13
to web...@googlegroups.com
i'm trying to upgrade from 2.5.2 to 2.6.1 in pythonanywhere got an error :
admin disabled because unable to access password file
i've tried to reload, delete and recreate webapps again but have the same result.
is there any hints to handle this kind of error?

thanks and best regards,
stifan

黄祥

unread,
Sep 14, 2013, 3:05:41 AM9/14/13
to web...@googlegroups.com
sorry for my previous email, i've paste the wrong error. this is the error i got after upgrade :

Internal error

Ticket issued: admin/139.192.164.192.2013-09-14.07-00-36.1c5f90cc-b8dd-4104-9b5c-0febff88170a

even after reload, delete and create webapps still got the old version (2.5.2), then during upgrade process (click the upgrade from the admin menu) the error message above is appear.
is there any steps i missed during upgrade on pythonanywhere?

Marin Pranjić

unread,
Sep 14, 2013, 7:45:31 AM9/14/13
to web...@googlegroups.com

What does the error ticket contain?

Marin (mobile)

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)

- http://github.com/we...

Niphlod

unread,
Sep 14, 2013, 8:45:24 AM9/14/13
to web...@googlegroups.com
maybe pythonanywhere "does its own things" and needs to be informed about the update ?

Massimo Di Pierro

unread,
Sep 14, 2013, 9:14:41 AM9/14/13
to web...@googlegroups.com
I need to see one of these tickets. I suspect the problem is that in 2.6.1 one admin file was missing but it is now in 2.6.2. In pythonanywhere you have a web based shell. You can just do:

cd ~
unzip web2py_src.zip

and the problem should go away.

Massimo

Matthew Spence

unread,
Sep 14, 2013, 10:05:37 AM9/14/13
to web...@googlegroups.com
Hi Massimo-

I took a look through the error file and I suspect the relevant line is:

    from gluon.tools import Config\nImportError: cannot import name Config\n'

Let me know if you want the whole error file. 

Thanks!
-Matt
--

VP

unread,
Sep 14, 2013, 10:40:26 AM9/14/13
to web...@googlegroups.com
Thanks Massimo for another great version of Web2py.

I wonder if much of this can be handled automatically by web2py, instead of asking users to manually copy files.  (It seems easy enough for web2py to look at the application folder and copy files automatically).

The thing is web2py can be upgraded through the admin panel.  As such many users will upgrade without reading this post, and they wouldn't know that they would have to manually update files.

greenpoise

unread,
Sep 14, 2013, 10:56:42 AM9/14/13
to web...@googlegroups.com
Yes Hero! The export CSV works perfectly on filtered items. Thanks

Paolo Valleri

unread,
Sep 14, 2013, 12:16:16 PM9/14/13
to web...@googlegroups.com
Your ticket sounds strange to me, because tells us that your gluon/tools.py doesn't have the class Config.
Did you really upgrade web2py?
Have you compiled your app before upgrading? If so, remove the compiled code and try again.
Let us know.

Paolo

Michele Comitini

unread,
Sep 14, 2013, 3:51:13 PM9/14/13
to web...@googlegroups.com

You seem to be running an old OS X?

Please try the following:

Rename the file gluon/pbkdf2_ctypes.py to something else for now.

On the ubuntu server just follow instructions from Massimo i.e. unzip new web2py.zip version over the old install.

mic

--
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.

黄祥

unread,
Sep 14, 2013, 6:09:03 PM9/14/13
to web...@googlegroups.com

i've tried massimo suggestion to update it from web shell :


here is the step that i take following massimo suggestion.
- i leave my webapp untouch
- i goes to bash console and execute the command :
cd ~
wget http://web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip
replace web2py/web2py.py? [y]es, [n]o, [A]ll, [N]one, [r]ename: A

error result :

Internal error

Ticket issued: admin/139.192.164.192.2013-09-14.07-00-36.1c5f90cc-b8dd-4104-9b5c-0febff88170a

in pythonanywhere, when i click the ticket url, it goes to new tab with the new ticket url, so that i don't know where is the root cause for the problem.
here is another step that i take following massimo suggestion.
- i leave my webapp untouch
- i goes to bash console and execute the command :
cd ~
rm -rf web2py
wget http://web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip

error result :
Internal error
Ticket issued: unknown

when i click the ticket issued, it tells :
admin disabled because unable to access password file

eventhough i used https.

any idea or hints, to get the new version on pythonanywhere?

Matthew Spence

unread,
Sep 14, 2013, 7:55:08 PM9/14/13
to web...@googlegroups.com
Hi guys-

I just tried a fresh install of web2py on PythonAnywhere. (So, only the "stock" applications of welcome, admin, and examples.) It auto-installs with 2.5.1, so I hit the button to upgrade to 2.6.2. It looks like it starts to install, but then I get "Internal Error" again. I pasted the error message here: http://pastebin.com/uABGmGgV

Thanks!!


On Thursday, September 12, 2013 6:27:37 PM UTC-4, Massimo Di Pierro wrote:

Adnan Smajlovic

unread,
Sep 14, 2013, 8:33:12 PM9/14/13
to web...@googlegroups.com
Thank you Massimo, and all contributors for a constant improvement of the most amazing framework!


--

Massimo Di Pierro

unread,
Sep 14, 2013, 8:34:18 PM9/14/13
to web...@googlegroups.com
I believe the problem is that the pythonanywhere process has not restarted. Your are still running the old one with the new applications, the new applications expect the new modules, but find the old ones in memory. 

To fix the problem: In the Dashboard click on [web] and press the button [Reload <your domain>]. If you have multiple domains you must do it for every domain. 

Massimo

Massimo Di Pierro

unread,
Sep 14, 2013, 8:36:43 PM9/14/13
to web...@googlegroups.com
If this is the error:


and you cannot open the ticket. You need to open the file:

and look into it. The last few lines contain the traceback. Cut and paste those few lines here. I suspect your problem is the same that Matthew is having: Pythonanywhere has must restart the web server.

massimo

On Saturday, 14 September 2013 02:05:41 UTC-5, 黄祥 wrote:

黄祥

unread,
Sep 14, 2013, 8:48:13 PM9/14/13
to web...@googlegroups.com
thank you so much for your hints, massimo, it works well now.
just want to share the step i take :

worked

- i leave my webapp untouch
- i goes to bash console and execute the command :
replace web2py/web2py.py? [y]es, [n]o, [A]ll, [N]one, [r]ename: A

not worked
- i leave my webapp untouch
- i goes to bash console and execute the command :
cd ~
rm -rf web2py

error result :
admin disabled because unable to access password file

eventhough i used https.

hope this can help the others in pythonanywhere.

黄祥

unread,
Sep 14, 2013, 8:57:39 PM9/14/13
to web...@googlegroups.com
sorry, forgot to add the step reload <your domain>

worked

- i leave my webapp untouch
- i goes to bash console and execute the command :
replace web2py/web2py.py? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
- reload <your domain>

thanks and best regards,
stifan

tomt

unread,
Sep 14, 2013, 9:28:24 PM9/14/13
to web...@googlegroups.com
Hi,

I am getting a mysql error after upgrading to 2.6.1(and 2.6.2)

Web2py doesn't throw a ticket, rather the mysql error shows up directly on the browser:

Query Not Supported: (1064, u"You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'LONGTEXT)) AND
(staffnotes.is_active = 'T')) ORDER BY staffnotes.date DESC, staf' at line 1")

I have record versioning enabled on the table in question:
db.define_table('staffnotes',
     Field('staffid','string'),
     Field('date','datetime',requires=IS_DATETIME(format='%Y-%m-%d %H:%M:%S'), default=request.now),
     Field('comment','string'),
     auth.signature,         
)
db.staffnotes._enable_record_versioning()

I chose to let the migration occur rather than go through the migrate_false steps mentioned.
The sql.log for the app revealed that migrations were performed on all string types, but not for the 'is_active' field defined with auth.signature. It remains defined as char(1) in mysql.

Any suggestions?

Massimo Di Pierro

unread,
Sep 14, 2013, 9:34:18 PM9/14/13
to web...@googlegroups.com
Can you please explain this sentence "Web2py doesn't throw a ticket, rather the mysql error shows up directly on the browser"? Where do you see this error? What steps caused it? Can you post a screenshot?

You have a field called "date". That should not be allowed. Are you sure it worked before?

Massimo

Matthew Spence

unread,
Sep 14, 2013, 9:43:25 PM9/14/13
to
Hey Massimo, I tried reloading all of my domains multiple times, and it still throws the same error, even upgrading with a stock, automatic fresh install of web2py from PA.

Massimo Di Pierro

unread,
Sep 14, 2013, 10:02:46 PM9/14/13
to web...@googlegroups.com
This is the error in the ticket you posted:

Traceback (most recent call last):\n  File "/home/mattspence/web2py/gluon/restricted.py", line 212, in restricted\n    exec ccode in environment\n  File "/home/mattspence/web2py/applications/admin/controllers/default.py", line 14, in <module>\n    from gluon.tools import Config\nImportError: cannot import name Config

You can see in /home/mattspence/web2py/applications/admin/controllers/default.py line
from gluon.tools import Config
Now check if gluon/tools.py contains class Config. I know it is there in 2.6.1 and 2.6.2.

The issue is if PythonAnywhere reloading failing? Or is there a path issue and it is looking at the wrong gluon/tools.py somewhere else?


On Saturday, 14 September 2013 18:55:08 UTC-5, Matthew Spence wrote:

Massimo Di Pierro

unread,
Sep 14, 2013, 10:05:33 PM9/14/13
to web...@googlegroups.com
BTW.... web2py.com runs on PythonAnywhere. I upgraded by unzipping web2py_src.zip over the old one, restarted the server, and everything worked as expected.


On Saturday, 14 September 2013 20:39:00 UTC-5, Matthew Spence wrote:
Hey Massimo, I tried reloading all of my domains multiple times, and it still throws the same error, even upgrading with a stock, automatic fresh install of web2py from PA.

tomt

unread,
Sep 14, 2013, 10:15:11 PM9/14/13
to web...@googlegroups.com
Yes, the program worked before.  The error appears when I select the 'note_list' function/controller.  I've attached a screenshot.(I hope it works)

When I re-install web2py_src-2.5.1 the note_list function works without error.

- Tom
note_list.jpeg

Massimo Di Pierro

unread,
Sep 14, 2013, 10:23:58 PM9/14/13
to web...@googlegroups.com
This helps a lot. Can you please email me (confidentially) your email and controller?

Matthew Spence

unread,
Sep 17, 2013, 6:12:51 PM9/17/13
to
Hi Massimo-

I took a look in gluon/tools.py as you recommended, and I do not see class Config! In fact, it's exactly the same as the previous gluon/tools.py from 2.5.1. I'm not sure why that might be.

edit: I just tried using the command line to update web2py

    wget http://www.web2py.com/examples/static/web2py_src.zip
    unzip web2py_src.zip

I reloaded my site, and everything works perfectly. So something is going wrong in the updating when using the GUI button in the admin interface so that the gluon/tools.py isn't updating to the latest version (among other files, possibly).

Anyway...problem solved for me at least. Thanks!, -Matt

Meir

unread,
Sep 30, 2013, 9:22:47 PM9/30/13
to web...@googlegroups.com
Hi Massimo!

Could describe best part: - new API jQuery('#component').reload()

Has some practical example?

And congratulations on the excellent work!

Krishna Bavandlapally

unread,
Nov 20, 2013, 4:33:38 AM11/20/13
to web...@googlegroups.com
I have updated web2py today, Every thing is fine except I am unable to open admin interface, not able to see the ticket also. In local machine its working fine.

Regards,
Krishna

Dave S

unread,
Nov 20, 2013, 9:13:15 PM11/20/13
to web...@googlegroups.com
On Wednesday, November 20, 2013 1:33:38 AM UTC-8, Krishna Bavandlapally wrote:
I have updated web2py today, Every thing is fine except I am unable to open admin interface, not able to see the ticket also. In local machine its working fine.
 
Regards,
Krishna
 

If you took care of the web2py.js and appadmin.* copies mentioned in the top post of this thread, the next thing to try is clearing your browser cache.

Also, if you have tickets in your app from before the upgrade, zip them off somewhere out of sight, because the new ticket parser will ticket itself trying to read them.

/dps

Remco Boerma

unread,
Nov 22, 2013, 5:44:32 AM11/22/13
to web...@googlegroups.com
Cheers, 

And a big "Thank you" to all who have contributed! 

With kind regards, 
Remco Boerma


--
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/groups/opt_out.



--
Cheers / Met vr. gr.
Remco Boerma
Reply all
Reply to author
Forward
0 new messages