Ticket #618 (new defect)
Bytecode-only (pyc) controllers not recognized
| Reported by: | Ivan | Owned by: | bbangert |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | dispatch/routing | Version: | 0.9.6 |
| Severity: | major | Keywords: | |
| Cc: |
Description
I've compiled to bytecode all files (python -m compileall .) in pylons project, then removed all source files. When started, router is unable to locate simple controller (404, not found).
However I can do nasty trick - the problematic file is lets say - controllers/auth.pyc. You can do :
1) paster serve --reload development.ini
2) In browser : locahost:8000/auth/index/
and it wont work (404), but
1) stop paster
2) rename controllers/auth.pyc to controllers/auth.py
3) In browser : localhost:8000/auth/index/
4) will show 'internal server error'
5) rename file back to /controllers/auth.pyc
6) refresh page - it will work
IMO very strange behavior. Dont exactly know if it is a router issue, or sobe other component. Any ideas how to fix it ?