My app uses web2py as a background task (as described in Ch. 4 of the 
web2py docs).  I have a slow memory leak in the background task. I'm trying 
to run guppy periodically to find it but I am getting a error when I try to 
use it. 

The relevant part of my code looks like this:

import guppy
heapy = guppy.hpy()
while True:
     ...
    logging.info ("%s" % heapy.heap())


When the last statement executes, I get an ImportError exception. The end 
of the stack trace looks like this:

  File "/Users/davidp/dev/python/ssk/gluon/custom_import.py", line 81, in 
custom_importer

    raise ImportError, 'Cannot import module %s' % str(e)

ImportError: Cannot import module 'guppy'


This code executes fine in the interpreter so I'm guessing the problem has 
to do with web2py's import mechanism.

Has anyone else been successful using guppy/heapy with web2py? I see that 
this isn't the first time this issue has come up but I don't see any 
mention of a solution.

Any help would be gratefully received.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to