1.96.3 is OUT

103 views
Skip to first unread message

Massimo Di Pierro

unread,
Jun 4, 2011, 10:02:43 AM6/4/11
to web2py-users
Just one minor change to deal with an error for system where users do
not have permission to write to /dev/urandom (typically on shared
hosts).

Jonathan Lundell

unread,
Jun 4, 2011, 11:00:56 AM6/4/11
to web...@googlegroups.com

The change treats read-only urandom the same as non-existent urandom, for warning purposes. Is that the intent?

Also, I wonder if it wouldn't be a good policy to unconditionally use local randomness (the seeded random) and mix in urandom randomness if available. That would help to guard against a bad urandom implementation that behaved (wrt read/write) normally.

danto

unread,
Jun 4, 2011, 1:01:35 PM6/4/11
to web...@googlegroups.com


2011/6/4 Jonathan Lundell <jlun...@pobox.com>

The change treats read-only urandom the same as non-existent urandom, for warning purposes. Is that the intent?

Also, I wonder if it wouldn't be a good policy to unconditionally use local randomness (the seeded random) and mix in urandom randomness if available. That would help to guard against a bad urandom implementation that behaved (wrt read/write) normally.


that seems to be a very good idea. with that, all who doesn't have access to /dev/urandom on host could use local urandom at least.

danto

unread,
Jun 4, 2011, 6:37:46 PM6/4/11
to web...@googlegroups.com
I installed 1.96.3 on webfaction and doesn't run (zip downloaded directly from web 1 minute ago):

[danto@web184 ~]$ python2.7 web2py/web2py.py
Traceback (most recent call last):
  File "web2py/web2py.py", line 16, in <module>
    import gluon.widget
  File "/home/danto/web2py/gluon/__init__.py", line 15, in <module>
    from globals import current
  File "/home/danto/web2py/gluon/globals.py", line 21, in <module>
    from html import xmlescape, TABLE, TR, PRE
  File "/home/danto/web2py/gluon/html.py", line 29, in <module>
    from utils import web2py_uuid, hmac_hash
  File "/home/danto/web2py/gluon/utils.py", line 98, in <module>
    ctokens = initialize_urandom()
  File "/home/danto/web2py/gluon/utils.py", line 93, in initialize_urandom
    logging.warn(
NameError: global name 'logging' is not defined


2011/6/4 danto <web2p...@gmail.com>

Pepe Araya

unread,
Jun 4, 2011, 7:34:35 PM6/4/11
to web...@googlegroups.com
I have the same problem as i mentioned here: https://groups.google.com/d/topic/web2py/e2KcQDYcPD0/discussion

danto

unread,
Jun 4, 2011, 8:40:23 PM6/4/11
to web...@googlegroups.com
2011/6/4 Pepe Araya <pepe...@gmail.com>

I have the same problem as i mentioned here: https://groups.google.com/d/topic/web2py/e2KcQDYcPD0/discussion


(still in webfaction) I installed a fresh copy (no upgrade) and at least I can access again to the scalfolding app but not to admin, now showing: "admin disabled because unable to access password file"

Pepe Araya

unread,
Jun 4, 2011, 8:50:27 PM6/4/11
to web...@googlegroups.com
did you installed it with the webfaction's script?

danto

unread,
Jun 4, 2011, 9:08:55 PM6/4/11
to web...@googlegroups.com
2011/6/4 Pepe Araya <pepe...@gmail.com>

did you installed it with the webfaction's script?

they (webfaction) already installed web2py for me when I first sign on with their service. probably using their script. later I was upgrading from the web interface and then restarting apache from ssh without problem until I upgraded to 1.96.1 fom 1.95.1
recently I just tried logging in through ssh and doing same things I do local: wget web2py, python2.* web2py.py and so on. I tryied moving the web2py folder inside webapps to web2py-bkp and replacing it with a fresh web2py wgeted from web2py.com and as I said, cannot access the password file (the old install also said the same).

pbreit

unread,
Jun 4, 2011, 9:19:12 PM6/4/11
to web...@googlegroups.com
Do you have a "parameters_###.py" file in your web2py folder?

danto

unread,
Jun 4, 2011, 9:31:48 PM6/4/11
to web...@googlegroups.com
2011/6/4 pbreit <pbreit...@gmail.com>

Do you have a "parameters_###.py" file in your web2py folder?

the was not any parameter_####.py file. still, I copied from the old folder and now I can see the login form to appadmin but my password doesn't work

pbreit

unread,
Jun 4, 2011, 9:41:00 PM6/4/11
to web...@googlegroups.com
If you have a new HMAC key, the old password file won't work. YOu could either copy over the old HMAC key into the new install or try generating a new password with python web2py.py -a 'your password' -i 127.0.0.1 -p 8000
Message has been deleted

Pepe Araya

unread,
Jun 4, 2011, 10:35:14 PM6/4/11
to web...@googlegroups.com
In webfaction, I did a fresh install using their install script but i get this error:

Traceback (most recent call last):
  File "web2py.py", line 16, in <module>
    import gluon.widget
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/__init__.py", line 15, in <module>
    from globals import current
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/globals.py", line 21, in <module>
    from html import xmlescape, TABLE, TR, PRE
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/html.py", line 29, in <module>
    from utils import web2py_uuid, hmac_hash
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/utils.py", line 98, in <module>
    ctokens = initialize_urandom()
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/utils.py", line 93, in initialize_urandom
    logging.warn(
NameError: global name 'logging' is not defined

any idea of what I can to do??
thanks a lot!

Jonathan Lundell

unread,
Jun 4, 2011, 10:41:50 PM6/4/11
to web...@googlegroups.com

For now, import logging. This should be changed to use logging the way the rest of web2py does, though. See compileapp.py for a generic example using the 'web2py' logger.

> thanks a lot!


Pepe Araya

unread,
Jun 4, 2011, 10:51:47 PM6/4/11
to web...@googlegroups.com
now it works ok!

thanks!!

danto

unread,
Jun 5, 2011, 4:08:34 AM6/5/11
to web...@googlegroups.com
2011/6/4 Pepe Araya <pepe...@gmail.com>
now it works ok!

thanks!!

it works for me too (also after reinstalling with webfaction's script), but now in tables where I have auth.signature it does not recognize the 'is_active' column

danto

unread,
Jun 5, 2011, 4:12:44 AM6/5/11
to web...@googlegroups.com

2011/6/5 danto <web2p...@gmail.com>

I forgot to say that when I go through the shell and do db.table.fields() it DOES show the 'is_active' column, I tryied with migrate=True but nothing was solved

Massimo Di Pierro

unread,
Jun 5, 2011, 9:02:10 PM6/5/11
to web2py-users
This should now be fixed in trunk. Will report 1.96.4 as soon as
confirmed.

Massimo Di Pierro

unread,
Jun 5, 2011, 9:02:59 PM6/5/11
to web2py-users
I need more information. Do you have a traceback?

On Jun 5, 3:08 am, danto <web2py.n...@gmail.com> wrote:
> 2011/6/4 Pepe Araya <pepea...@gmail.com>

Jonathan Lundell

unread,
Jun 5, 2011, 9:55:45 PM6/5/11
to web...@googlegroups.com
On Jun 4, 2011, at 6:50 PM, Pepe Araya wrote:
In webfaction, I did a fresh install using their install script (https://wiki.webfaction.com/wiki/Web2py-LatestSource) and I get this error:

Traceback (most recent call last):
  File "web2py.py", line 16, in <module>
    import gluon.widget
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/__init__.py", line 15, in <module>
    from globals import current
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/globals.py", line 21, in <module>
    from html import xmlescape, TABLE, TR, PRE
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/html.py", line 29, in <module>
    from utils import web2py_uuid, hmac_hash
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/utils.py", line 98, in <module>
    ctokens = initialize_urandom()
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/utils.py", line 93, in initialize_urandom
    logging.warn(
NameError: global name 'logging' is not defined

Any idea?

import logging (in utils.py)

Pepe Araya

unread,
Jun 5, 2011, 10:11:25 PM6/5/11
to web...@googlegroups.com
Sorry, that is a duplicate message of this: https://groups.google.com/d/msg/web2py/f3l_IOcx560/wNLyIfvSj6wJ

After your recommendation, I added that line to utils.py and it works but now, after a fresh install with the version in trunk other error appear : 


Traceback (most recent call last):
  File "web2py.py", line 16, in <module>
    import gluon.widget
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/__init__.py", line 15, in <module>
    from globals import current
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/globals.py", line 21, in <module>
    from html import xmlescape, TABLE, TR, PRE
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/html.py", line 29, in <module>
    from utils import web2py_uuid, hmac_hash
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/utils.py", line 103, in <module>
    ctokens = initialize_urandom()
  File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/utils.py", line 93, in initialize_urandom
    except IOerror:
NameError: global name 'IOerror' is not defined

Jonathan Lundell

unread,
Jun 5, 2011, 10:17:08 PM6/5/11
to web...@googlegroups.com
On Jun 5, 2011, at 7:11 PM, Pepe Araya wrote:
Sorry, that is a duplicate message of this: https://groups.google.com/d/msg/web2py/f3l_IOcx560/wNLyIfvSj6wJ

After your recommendation, I added that line to utils.py and it works but now, after a fresh install with the version in trunk other error appear : 

It should be IOError (capital E)

Pepe Araya

unread,
Jun 5, 2011, 11:35:53 PM6/5/11
to web...@googlegroups.com
With that change it works.

 open('/dev/urandom','wb').write(''.join(chr(t) for t in ctokens))
        except IOError:
            # works anyway


thanks!
Reply all
Reply to author
Forward
0 new messages