Change this to:
import com.example.core.bbdd
output = ''
print >> output, '__file__', com.example.core.bbdd.__file__
print >> output, 'type()', type(temp)
print >> output, 'dir()', dir(temp)
In other words, start adding some debugging code in there to
introspect stuff about the class.
The __file__ will tell you whether you are even picking up the code
file from the location you expect and then you can edit that file to
make sure it contains what you think it should.
The other stuff tells you a bit about what the variable instance is
and what methods are available.
My guess would be that you are picking up old version of code because
it hasn't installed where mod_wsgi is looking for it of Apache wasn't
restarted to pick up changes.
Worst case is that somehow you have a .pyc file next to .py file that
is newer and so older .pyc file being used.
Graham
> status = '200 OK'
> response_headers = [('Content-type', 'text/plain'),('Content-
> Length', str(len(output)))]
> start_response(status, response_headers)
> return [output]
>
> i have this error in the apache log file: ( this error is)
>
> [Tue Jan 04 15:04:20 2011] [info] [client 192.168.254.2] mod_wsgi
> (pid=2731, process='', application='tours.in|'): Reloading WSGI script
> '/var/www/sites/mypage/app/handler.wsgi'
> [Tue Jan 04 15:04:20 2011] [error] [client 192.168.254.2] mod_wsgi
> (pid=2731): Exception occurred processing WSGI script '/var/www/sites/
> mypage/app/handler.wsgi'
> [Tue Jan 04 15:04:20 2011] [error] [client 192.168.254.2] Traceback
> (most recent call last):
> [Tue Jan 04 15:04:20 2011] [error] [client 192.168.254.2] File "/var/
> www/sites/mypage/app/handler.wsgi", line 21, in application
> [Tue Jan 04 15:04:20 2011] [error] [client 192.168.254.2] output =
> temp.anymethod()
> [Tue Jan 04 15:04:20 2011] [error] [client 192.168.254.2]
> AttributeError: 'connector' object has no attribute 'anymethod'
>
> If I load the class for the Command Line in the python console,
> everything works fine, attributes and methods exist for python.
>
> I have no idea what could be the problem. Any help would be
> appreciated =)
>
> --
> You received this message because you are subscribed to the Google Groups "modwsgi" group.
> To post to this group, send email to mod...@googlegroups.com.
> To unsubscribe from this group, send email to modwsgi+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
>
>