Re: erros ir web2py 2.0.8

117 views
Skip to first unread message

Niphlod

unread,
Sep 9, 2012, 6:24:50 AM9/9/12
to web2py-d...@googlegroups.com
permission denied seems like a permission error. uswgi has access to the web2py folder ?
the second points to not having a VERSION file inside the web2py folder.

On Sunday, September 9, 2012 12:11:49 PM UTC+2, Francisco Costa wrote:
Hi, I'm getting this errors in web2py 2.0.8 using nginx + uwsgi

  File "/opt/web2py/gluon/admin.py", line 463, in create_missing_folders
    os.mkdir(path)
OSError: [Errno 13] Permission denied: '/applications'
unable to load app 0 (mountpoint='') (callable not found or import error)

other error:

  File "/opt/web2py/gluon/main.py", line 114, in <module>
    raise RuntimeError, "Cannot determine web2py version"
RuntimeError: Cannot determine web2py version
unable to load app 0 (mountpoint='') (callable not found or import error)










Niphlod

unread,
Sep 9, 2012, 6:42:17 AM9/9/12
to web2py-d...@googlegroups.com
I don't have that problem and I'm running uwsgi+nginx as well. Can we see the config files?

On Sunday, September 9, 2012 12:37:54 PM UTC+2, Francisco Costa wrote:

is trying to create applications  folder on /

> --
> -- mail from:GoogleGroups "web2py-developers" mailing list
> make speech: web2py-d...@googlegroups.com
> unsubscribe: web2py-develop...@googlegroups.com
> details : http://groups.google.com/group/web2py-developers
> the project: http://code.google.com/p/web2py/
> official : http://www.web2py.com/
>  
>  

Niphlod

unread,
Sep 9, 2012, 6:51:31 AM9/9/12
to web2py-d...@googlegroups.com
and nginx and uwsgi on what config are running ?
how is placed your directory structure ?

On Sunday, September 9, 2012 12:46:30 PM UTC+2, Francisco Costa wrote:

dont have any, is a fresh install

Niphlod

unread,
Sep 9, 2012, 1:41:00 PM9/9/12
to web2py-d...@googlegroups.com
ok, forget if I'm wrong but in both this and the other thread you are asking help. We're giving some answers (or at least some requests for further informations) to be able help you. You reply only with other details: don't get me wrong, further details are always welcome, but could you please reply with the bits we asked ?
Right here the problem is the same of the other thread. Something in your system is "non-standard" and we have to pinpoint the cause. Something about the initialization of your app is screwing with the base folder setting. Normally the first thing called (web2py.py or wsgihandler.py in this case) sets the current work directory to the dir of the file, where it is supposed to be the rest of web2py framework.
Either is your app code is doing that or is the configs.
Let's start with the placement of your app on the disk and both configs of nginx and uwsgi, then we'll follow along.


On Sunday, September 9, 2012 6:42:07 PM UTC+2, Francisco Costa wrote:
I need the Spoller from uwsgi,
so in my app I have a module that imports stuff for sending Email

from gluon.tools import Mail

when I comment this line the error goes away, so I suppose that importing gluon is somewhere trying to create the /applications


Francisco Costa
http://franciscocosta.com

Massimo DiPierro

unread,
Sep 11, 2012, 11:11:04 AM9/11/12
to web2py-d...@googlegroups.com
This was resolved. right?

On Sep 9, 2012, at 12:47 PM, Francisco Costa wrote:

Hi Simone,
I traced the error,

In /etc/init.d/uwsgi (where I start uwsgi) I have this

DAEMON_OPTS="-s 127.0.0.1:9001 -M 2 -t 30 -A 2 -p 2 -d /var/log/uwsgi.log
    --pythonpath $PYTHONPATH --module $MODULE --harakiri-verbose
    --spooler /opt/web2py/applications/welcome/spooler/
    --import /opt/web2py/applications/welcome/modules/spooler.py"

where I import the spooler modukle. The error was on it, because I was not changing the folder before importing gluon stuff
I add this os.chdir('/opt/web2py') and everything is working now



Francisco Costa
http://franciscocosta.com



On Sun, Sep 9, 2012 at 6:41 PM, Niphlod <nip...@gmail.com> wrote:
e the problem is the same of the other thread. Something in your system is "non-standard" and we have to pinpoint the cause. Something about the initialization of your app is screwing with the base folder setting. Normally the first thing called (web2py.py or wsgihandler.py in this case) sets the current work directory to the dir of the file, where it is supposed to be the rest of web2py framework.


Niphlod

unread,
Sep 11, 2012, 11:14:16 AM9/11/12
to web2py-d...@googlegroups.com
seems so, it was a bug in the app screwing with the initial os.chdir. Moreover, it was not a bug in web2py but importing web2py modules without first chdir-ing into the right directory.

Jonathan Lundell

unread,
Sep 11, 2012, 11:22:41 AM9/11/12
to web2py-d...@googlegroups.com
On 11 Sep 2012, at 8:11 AM, Massimo DiPierro <massimo....@gmail.com> wrote:
This was resolved. right?

We've taken steps to make web2py more independent of the cwd, in particular with more consistent use of gluon_parent and applications_parent. The problem here (in web2py) was that gluon_parent ultimately defaults to cwd. 

I don't think that needs to be the case, but I'm hesitant to fix it because I'm not in a position to test the packaged versions of web2py. If we could recruit a tester or two, it shouldn't take much to make it work.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages