web2py 1.87.3 is OUT

18 views
Skip to first unread message

mdipierro

unread,
Oct 13, 2010, 2:55:11 PM10/13/10
to web2py-users
It includes an important bug fix for a bug introduced in 1.87.2:

The bug:
If you created a new app in 1.87.2, then you would not be able to use
appadmin for that app.

The fix:
- Install (i.e. unzip over old version) 1.87.3
- copy applications/welcome/controllers/appadmin.py over applications/
yournewapp/controllers/appadmin.py

Massimo

annet

unread,
Oct 14, 2010, 3:48:06 AM10/14/10
to web2py-users
Massimo,

I upgraded to version 1.87.3, the problem I am facing is that I cannot
upload and install packed applications via the admin web interface.
The flash message: unable to install application "init".


Kind regards,

Annet.

mdipierro

unread,
Oct 14, 2010, 10:10:54 AM10/14/10
to web2py-users
which distribution (source, binary)? which os?

annet

unread,
Oct 14, 2010, 12:24:47 PM10/14/10
to web2py-users
Locally I don't have the problem: source on Mac OS X Leopard and
source on MAC OS Snow Leopard. The problem occurred after upgrading to
1.87,3 at webfaction, I unzipped the source over a previous web2py
version. I don't know on which OS the provide their shared hosting
plans.


Kind regards,

Annet

Bruno Rocha

unread,
Oct 14, 2010, 12:35:45 PM10/14/10
to web...@googlegroups.com
Thats RedHat or CentOS, did you restarted apache there?

I am having problems on webfaction too, I think it is permission issues.

When I create a new folder for under applications/ I cant delete or rename that via SSH, and I can't create new apps in /admin

We need to detect if this is a web2py or host issue before open a ticket there.

2010/10/14 annet <annet....@gmail.com>



--

http://rochacbruno.com.br

Christopher Steel

unread,
Oct 14, 2010, 6:16:05 PM10/14/10
to web2py-users
Hi Annet,

You need to unzip as the correct user so you may need to run something
like:

sudo su www-data

then as www-data (or which ever user your setup uses) you do your
unzip...

you can try

ls -al

to see what the permissions currently are...

C.

ron_m

unread,
Oct 14, 2010, 8:59:34 PM10/14/10
to web2py-users
I found I need to login to the machine and as www-data run the
application server once from python as in

python web2py.py supply an admmin password with -a and then crtrl-c to
break out.

One clue is if the NEWINSTALL file is still there in the web2py
directory then it won't work until the above is performed. The Apache
wsgi interface will then work for loading applications.

I haven't has a chance to figure out why this is, the permissions for
the entire file tree were owned by www-data but still application
loading failed until it was run once directly by python.

Ron

annet

unread,
Oct 15, 2010, 3:07:41 AM10/15/10
to web2py-users
Hi Chris,

In April we worked out the following procedure to upload and install
packed web2py applications at webfaction:

1) Log on to webfaction via terminal/ssh
2) Go to your remote web2py/applications/ directory
3) As the user who is the owner of the Welcome application, manually
create a directory
4) Upload your web2py application via the web interface and rename it
to match the name of the directory you created manually

This procedure worked at webfaction until I upgraded to web2py version
1.87.x.

I also installed web2py 1.87.3 running webfaction's custom install
script for web2py, but that doesn't make any difference to unzipping
version 1.87.3 over the older version, I get the same error.


I tried ls -al, I am signed on as fitwise and the owner of the Welcome
application is fitwise as well, nothing has changed in this case.


Kind regards,

Annet.

annet

unread,
Oct 15, 2010, 3:50:05 AM10/15/10
to web2py-users
Massimo and Ron,

When I run python web2py.py I get the following ImportError:

Traceback (most recent call last):
File "web2py.py", line 20, in ?
import gluon.widget
File "/home/fitwise/webapps/web2py/web2py/gluon/widget.py", line 25,
in ?
import main
File "/home/fitwise/webapps/web2py/web2py/gluon/main.py", line 62,
in ?
from restricted import RestrictedError
File "/home/fitwise/webapps/web2py/web2py/gluon/restricted.py", line
18, in ?
from utils import web2py_uuid
File "/home/fitwise/webapps/web2py/web2py/gluon/utils.py", line 10,
in ?
import hashlib
ImportError: No module named hashlib


Does this have anything to do with the problem?


Annet.

ron_m

unread,
Oct 15, 2010, 5:39:54 AM10/15/10
to web2py-users
This could be the problem, since you are probably on CentOS or Redhat
a version of Python < 2.5 will not have hashlib built in

http://pypi.python.org/pypi/hashlib/20060408a

is where you can get one tested on 2.3 and 2.4

I have not had to do something like this yet but I believe site-
packages is probably where you would put it, not sure.

http://groups.google.com/group/web2py-developers/browse_thread/thread/6d8d80437938a4b7

talks about this.

Ron

Zphen

unread,
Oct 15, 2010, 4:38:17 PM10/15/10
to web2py-users

> I upgraded to version 1.87.3, the problem I am facing is that I cannot
> upload and install packed applications via the admin web interface.
> The flash message: unable to install application "init".

I had the same problem when setting up an Ubuntu 10.04 AMI with web2py
1.87.3 on EC2 yesterday using the setup-web2py-ubuntu.sh install
script as described in the book. Fortunately the first solution that I
tried solved it for me, which was from the WebFaction Forum at
http://forum.webfaction.com/viewtopic.php?pid=18401

mkdir web2py/deposit
touch web2py/applications/__init__.py

Simon

annet

unread,
Oct 16, 2010, 5:57:56 AM10/16/10
to web2py-users
Simon,

Thanks running those two commands solved the problem.


Kind regards,

Annet.

mdipierro

unread,
Oct 16, 2010, 10:58:52 AM10/16/10
to web2py-users
How do you suggest change the installation script to get this done
automatically?

On Oct 15, 3:38 pm, Zphen <sluk...@gmail.com> wrote:
> > I upgraded to version 1.87.3, the problem I am facing is that I cannot
> > upload and install packed applications via the admin web interface.
> > The flash message: unable to install application "init".
>
> I had the same problem when setting up an Ubuntu 10.04 AMI with web2py
> 1.87.3 on EC2 yesterday using the setup-web2py-ubuntu.sh install
> script as described in the book. Fortunately the first solution that I
> tried solved it for me, which was from the WebFaction Forum athttp://forum.webfaction.com/viewtopic.php?pid=18401

Zphen

unread,
Oct 17, 2010, 7:56:18 AM10/17/10
to web2py-users
I saw that the relevant operations are performed on first run in
widget.console(), so I suggest we execute this function in the script
too:

--- setup-web2py-ubuntu.sh 2010-10-13 01:22:51.000000000 +1100
+++ setup-web2py-ubuntu.sh.new 2010-10-17 22:49:52.258486749 +1100
@@ -163,5 +163,6 @@

/etc/init.d/apache2 restart
cd /home/www-data/web2py
+sudo -u www-data python -c "from gluon.widget import console;
console();"
sudo -u www-data python -c "from gluon.main import save_password;
save_password(raw_input('admin password: '),443)"
echo "done!"

Simon

mart

unread,
Oct 17, 2010, 11:54:07 AM10/17/10
to web2py-users
Would writing an installer be useful? there are many possibilities,
and not that huge of a deal to get something out there and that can be
expanded with richer/better features with time... Besides, the
benefits are well worth it...

1) give the user options @ install/update/upgrade time is always a
good thing
* upgrading without overwriting existing application is often
desirable and is always appreciated from the user perspective where
doing it through an installer (which is viewed as the competent
authority by many) does in fact inspire confidence, specially with the
more novice.
* updates (as opposed to upgrades) can be much quicker and more
seamless
* gives the user a good sense cmd & control when provided with the
choice of well targeted configuration options (reminds me of the story
about WHY the Duncan Hines people decided that adding an egg to the
recipe was better than not where, previously they had a much better
and easier product to use (just add water)... because the mommies
needed to feel better about baking a cake)
* sometimes, all it takes to fix a problem either introduced by the
software provider or a problem cause by well meaning but accident
prone user, is with an installer with a nice big blue check box
labeled "yes, I just did something silly and I and would like the
installer to fix my screw up?" - something I have used MANY times
before and was glad for the chance to choose "fix" and not "re-
install" (or upgrade)
* many users feel better looked after with an installer that tells
him/her what is hapening (i.e. "oh, it backs up my previous install
and I can revert! :)" )
* the user can send the software provider known logs back to the
provider about a particular configuration with things an installer can
record (where it was installed, OS, disk space, previous version, ...
what is needed)
* the list goes on...

2) * from the distribution side, this provides a very good first
contact with the user... you rarely get more of the users attention
then @ install time (unless you're that big of a fan that you follow
threads on google groups ;))
* with good use of such tings as well chosen panels, you get this
"free of charge publicity time slot" - one on one time with the user
(specially new ones),
* give the provider (in this case Massimo) an open window to reach
his/her users at chosen times (i.e. @ update time, the user chooses
"update form the web", where Massimo can have messages displayed,
flashing panels with target information, why not take the opportunity
to survey the users (Eg. how well know is it, the number if people who
install web2py? do they get stumped and discouraged? does everybody
know about the web2py google group?, I would assume that there are
more of the "won't look any further than the install" type of people
out there, than there are of the "keep at this until it works" type of
people...
* there are many more good reasons to go the install way... more
than I could possibly come up here with this quick blurb... besides,
it doesn't mean you don't keep the current install/update/upgrade
methods you have, just means you provide more opportunities...

anyways, just my cents and would be glad to help if needed

Mart :)
Reply all
Reply to author
Forward
0 new messages