On Mar 14, 2011, at 9:15 AM, mattynoce wrote:
> hi jonathan. i tried renaming routes.py and leaving the default config, and 
> that actually did not work either. so something happened in the upgrade that 
> screwed things up.
> 
> i had a web2py-wide routes file in my last version, but it simply had the 
> error code and nothing else. i didn't fully grok the routes system so i 
> decided to let it be since it worked well.
> 
> upon upgrading, everything in my applications work well but it doesn't 
> recognize appadmin as a controller. it's very possible there's something else 
> i need to do as a result of the upgrade but i'm not sure what it is.
> 
> with the routes file, it was working successfully to find either 
> /init/default/someFunction or just /someFunction, which was great. not sure 
> where the current problem is coming from.
> 
> i'll keep digging and post here if i find it.
> 
> thanks,
> matt

Two things that might be obvious, and it sounds like you've taken them into 
account, but for the benefit of the thread...

One is to be sure you've restarted web2py when changing (or renaming) 
routes.py. This is checkable by trying to access /someFunction (in this 
example), which will fail without routes enabled.

The other is that the usual way that the bad-controller message pops up is that 
web2py can't find (or at least can't open) the controller file itself. I'd 
double-check that by copying the controller portion of the error message 
(appadmin in this case) and from the web2py base directory doing:

$ ls applications/myapp/controllers/appadmin.py (or whatever)
$ ls -l applications/myapp/controllers

The first ls is just to make sure that the file is there. The second is to 
compare file permissions between (say) default.py, which is working, and 
appadmin.py, which is not. There's no reason for the owner, group and 
permissions to be different between the two.

You've already checked the first one, I see.

If you don't find the problem, you could patch the logic that's trying to open 
the file to show a little more information about the failure.

Reply via email to