Why would my app suddenly break on me?
Happens with no model, happens despite having wiped cache, databases,
errors, sessions & restarted
Other applications are fine, so the web2py install is fine...
F
The app does not have permission to open the controller file.
Open python and try:
open('C:\\Bin\\web2py\\applications\\sahana/controllers/
default.py','r')
does it work? Is the path right?
Massimo
I really don't know!
> The app does not have permission to open the controller file.
> Open python and try:
> open('C:\\Bin\\web2py\\applications\\sahana/controllers/
> default.py','r')
> does it work? Is the path right?
Seems to:
In [2]: open('C:\\Bin\\web2py\\applications\\sahana/controllers/
default.py','r')
Out[2]: <open file 'C:\Bin\web2py\applications\sahana/controllers/
default.py', m
ode 'r' at 0x0253EF08>
That's from a Python shell in the app too...so model loads completely
without error.
Stumped...
F
Does welcome works fine?
Massimo
100% repro :/
> Does welcome works fine?
Yes, other apps are fine...
F
All seem like valid ideas, however the problem happens even when there
are no models!
What happens before/after model execution but which is within
application?
- happens with all controllers...invalid controller names still give
'invalid request' so web2py can see that the controller file exists...
F
I suggest
cd applications
mkdir sahanatest
cp -r sahana/* sahanatest
rm -r sahanatest/models
echo 'def index(): return dict()' > sahanatest/controllers/test.py
wget http://.../sahanatest/test/index
Do you get the error?
No, not even with the model & with custom views code.
After some more experimentation, I found that I needed to amend the
text encoding of the files & copy/paste into new files.....doesn't
seem like the end result matters, just the amending...default.py
fixed, still struggling with the rest.
Not sure why this would suddenly have happened!
Very bizaarre...
Thanks for your help in narrowing it down anyway :)
F