Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 9 and Version 10 of ModPythonIntegration


Ignore:
Timestamp:
12/15/05 17:06:42 (14 years ago)
Author:
warren@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModPythonIntegration

    v9 v10  
    1111PythonOption cherrysetup $NAME_OF_YOUR_START_SCRIPT::mp_setup 
    1212}}} 
     13 
     14$NAME_OF_YOUR_START_SCRIPT should be the filename minus the .py extension, since a dot will attempt to load a module named 'py' from that file. 
    1315 
    1416Warning! The start script is usually MyAppName-start.py, and the dash will screw up the !PythonOption. Ergo, lose the dash and there shouldn't be any problems. 
     
    6971 
    7072the problem is probably that one (or more) eggs that your application (or turbogears) wants to use are zipped. You will need to figure out which one(s) are problematic and reinstall them using 'easy_install -Z' (or just go into your site-packages directory and manually unzip them to the right places).  
     73 
     74Note: 
     75If you get an error saying: 
     76 
     77AttributeError: 'module' object has no attribute 'argv' 
     78 
     79It is likely because turbogears created the startup script to check for a .cfg filename from the command line.  It seems that not all versions of turbogears created the script like this, and running the script via mod_python means there are no command line arguments.  So, to fix just remove or comment the line checking command line args, such as: 
     80 
     81{{{ 
     82if len(sys.argv) > 1: 
     83    cherrypy.config.update(file=sys.argv[1]) 
     84elif exists(join(dirname(__file__), "setup.py")): 
     85    cherrypy.config.update(file="/dev.cfg") 
     86else: 
     87    cherrypy.config.update(file="prod.cfg") 
     88 
     89to 
     90 
     91#if len(sys.argv) > 1: 
     92#    cherrypy.config.update(file=sys.argv[1]) 
     93if exists(join(dirname(__file__), "setup.py")): 
     94    cherrypy.config.update(file="/dev.cfg") 
     95else: 
     96    cherrypy.config.update(file="prod.cfg") 
     97}}} 
     98 
     99Also, you may have to put the full pathname for the .cfg filename in order for turbogears to find it.