[mod_python] Question

Michael Robokoff mike.robokoff at apioutsourcing.com
Wed Oct 10 07:19:07 EDT 2007


Thank you very much for your help! it is really appreciated!

--Mike

 
-----Original Message-----
From: Graham Dumpleton [mailto:graham.dumpleton at gmail.com] 
Sent: Tuesday, October 09, 2007 5:28 PM
To: Michael Robokoff
Cc: mod_python
Subject: Re: [mod_python] Question

Looks like you haven't imported the module in the first place. Use:

  from mod_python import apache

Graham

On 10/10/2007, Michael Robokoff <mike.robokoff at apioutsourcing.com> wrote:
>
>
>
>
> I have just compiled pyton-2.5.1, mod_python-3.3.1,
> tomcat-connectors-1.2.23, MySQL-python-1.2.2, SQLAlchemy-0.3.9 and
> apache-2.0.59.
>
>
>
> I know all are not associated with this problem but I wanted you to be
aware
> of them just incase there may be a compatibility issue.
>
> Anyway when I run with a previously good config I get the following when
> trying to access our page.
>
>
>   MOD_PYTHON ERROR
>
> ProcessId:      7989
> Interpreter:    '10.0.0.99'
>
> ServerName:     '10.0.0.99'
> DocumentRoot:   '/usr/local/apache2/htdocs'
>
> URI:            '/test/standard/'
> Location:       '/test/standard/'
> Directory:      None
> Filename:       ''
> PathInfo:       None
>
> Phase:          'PythonAccessHandler'
> Handler:        'access'
>
> Traceback (most recent call last):
>
>   File
> "/usr/local/lib/python2.5/site-packages/mod_python/importer.py",
> line 1537, in HandlerDispatch
>     default=default_handler, arg=req, silent=hlist.silent)
>
>   File
> "/usr/local/lib/python2.5/site-packages/mod_python/importer.py",
> line 1229, in _process_target
>     result = _execute_target(config, req, object, arg)
>
>   File
> "/usr/local/lib/python2.5/site-packages/mod_python/importer.py",
> line 1128, in _execute_target
>     result = object(arg)
>
>   File "/usr/local/apache2/htdocs/test/standard/access.py",
> line 39, in accesshandler
>     db_module.createSession(sess._sid)
>
>   File
> "/usr/local/apache2/htdocs/test/standard/db_module.py",
> line 88, in createSession
>     apache.log_error("Error %d: %s" % (e.orig.args[0], e.orig.args[1]))
>
> NameError: global name 'apache' is not defined
>
>
> MODULE CACHE DETAILS
>
> Accessed:       Tue Oct  9 10:02:57 2007
> Generation:     0
>
> _mp_3318e5527a8f6da0ffb4f529361e3d2e {
>   FileName:
> '/usr/local/apache2/htdocs/test/standard/access.py'
>   Instance:     1 [IMPORT]
>   Generation:   2
>   Modified:     Mon Aug 20 15:11:00 2007
>   Imported:     Tue Oct  9 10:02:57 2007
>   Children:
> '/usr/local/apache2/htdocs/test/standard/db_module.py'
> }
>
> _mp_8ef5cf081b949f7d69d523216e25838d {
>   FileName:
> '/usr/local/apache2/htdocs/test/standard/db_module.py'
>   Instance:     1 [IMPORT]
>   Generation:   1
>   Modified:     Mon Aug 20 15:10:42 2007
>   Imported:     Tue Oct  9 10:02:57 2007
> }
>
>
>
> If anyone could give me some idea's on where to look next it would be
really
> appreciated.
>
> I don't know python. So I may be missing something simple.
>
>
>
> Thanks for your help!
>
>
>
>
>
> Michael Robokoff
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>
>




More information about the Mod_python mailing list