"Unable to create application" on WebFaction

115 views
Skip to first unread message

Dave

unread,
Dec 11, 2010, 10:20:47 PM12/11/10
to web2py-users
I created a web2py app on WebFaction using the custom install script
posted on the WebFaction site. I then linked it to two subdomains:

Name: web2py_admin
Https: yes
Subdomains: admin.web2py.dlawrence.webfactional.com
Site apps: web2py

Name: web2py_public
Https: no
Subdomains: web2py.dlawrence.webfactional.com
Site apps: web2py

I used the admin url and logged in with my WebFaction account
password. So far so good.

In the admin page, I attempted to create a simple application. Result:
"Unable to create application"

I have now removed web2py and re-installed it three times, with the
same result. The really frustrating aspect of this is that I installed
web2py months ago and had absolutely no problems. Is this a
permissions problem? If so, why didn't it occur the first time I
installed web2py?

Any help would be appreciated.

Here is the error snapshot:
<type 'exceptions.IOError'>([Errno 2] No such file or directory: '/
home/dlawrence/webapps/web2py/web2py/applications/admin/../test1/
wizard.metadata')

Traceback:
Traceback (most recent call last):
File "/home/dlawrence/webapps/web2py/web2py/gluon/restricted.py",
line 188, in restricted
exec ccode in environment
File "/home/dlawrence/webapps/web2py/web2py/applications/admin/
controllers/wizard.py", line 572, in <module>
File "/home/dlawrence/webapps/web2py/web2py/gluon/globals.py", line
96, in <lambda>
self._caller = lambda f: f()
File "/home/dlawrence/webapps/web2py/web2py/applications/admin/
controllers/wizard.py", line 200, in step6
create(form.vars)
File "/home/dlawrence/webapps/web2py/web2py/applications/admin/
controllers/wizard.py", line 489, in create
file=open(meta,'wb')
IOError: [Errno 2] No such file or directory: '/home/dlawrence/webapps/
web2py/web2py/applications/admin/../test1/wizard.metadata'

annet

unread,
Dec 12, 2010, 3:45:05 AM12/12/10
to web2py-users
Hi Dave,

To workaround this problem I always create an application using ssh.

[mydomain@webxx ~]$ cd webapps/web2py/web2py/applications/
[mydomain@webxx applications]$ mkdir base


And then upload and install the packed web2py application via the web
interface and rename it to match the name of the directory I manually
created.

Don't forget to check the overwrite installed app check box.


Kind regards,

Annet

Dave

unread,
Dec 12, 2010, 7:39:39 AM12/12/10
to web2py-users
Thank you Annet.

I used ssh to create an application directory as you indicated. web2py
created an empty application stub when it recognized the new directory
in webapps/web2py/web2py/applications.

I then tried to pack the welcome application via the web interface
"pack all" button, but could not: "Internal error".

Ideas?
And why is this occurring at all? This seems to be a larger problem
than just not being able to use the create app buttons in the web
interface.

Dave

Dave

unread,
Dec 12, 2010, 8:31:29 AM12/12/10
to web2py-users
To follow up, I tried this again and had some success:

1. Created 'myApp' test directory using ssh session, in 'webapps/
web2py/web2py/applications/'
Note that it appears on the 'Installed Applications' page in the admin
web interface, but clicking the 'edit' button reveals an empty app.
2. Using web2py running locally on my laptop, I successfully packaged
the welcome application using the admin web interface. Saved package
file locally.
3. Then in admin interface for web2py on webfaction, I used 'Upload &
install packed application' as directed by annet:
> Application name: myApp
> Upload a package: [used Browse to select the package saved in step
2]
> overwrite installed app: selected
Clicked Install and the packaged myApp app was installed.

Now clicking edit for the myApp application shows that it is a
complete app copied from the welcome app.

So thank you Annet. I do not understand the reason for the problem,
but at least there is a workaround.

Dave

annet

unread,
Dec 13, 2010, 7:21:09 AM12/13/10
to web2py-users
Hi Dave,

I don't know what causes this problem either, I always use the
procedure you describe above, it works, that's why I didn't bother the
find out why the standard procedure doesn't work.

Annet

Bruno Rocha

unread,
Dec 15, 2010, 4:11:20 PM12/15/10
to web...@googlegroups.com
I solved the problem.

I dont know why, but web2py in webfaction does not creates the 'deposit' folder.

I just create myself.

on ssh:  
cd webapps/app/web2py
mkdir deposit

Problem solved!

2010/12/13 annet <annet....@gmail.com>

Jonathan Lundell

unread,
Dec 15, 2010, 4:49:08 PM12/15/10
to web...@googlegroups.com
On Dec 15, 2010, at 1:11 PM, Bruno Rocha wrote:
> I solved the problem.
>
> I dont know why, but web2py in webfaction does not creates the 'deposit' folder.
>
> I just create myself.
>
> on ssh:
> cd webapps/app/web2py
> mkdir deposit
>
> Problem solved!

web2py will create deposit/ for you, but only when it's started from the command line.

Likewise creating site-packages *and* adding it to sys.path. Indeed, grep the source for site-packages; the logic definitely needs work.

Perhaps this and some of the other startup logic ought to be factored out and then also called by wsgihandler and the other handlers. I don't see why one wouldn't want the same sequence everywhere (though the cgi and gae handlers probably want to have a more efficient test for whether the standard folders have been created, rather than testing each one) (since they run on every request).

Reply all
Reply to author
Forward
0 new messages