kdwyer / apptrace

Automatically exported from code.google.com/p/apptrace
0 stars 0 forks source link

Bug in handling class objects #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. installed apptrace as per the instructions in wiki
2. profile a gae application with class objects

The following error is encountered 
File 
"/Library/Python/2.6/site-packages/apptrace-0.2.1-py2.6.egg/apptrace/middleware.
py", line 116, in wsgi_app
    if record: recorder.trace()
  File "/Library/Python/2.6/site-packages/apptrace-0.2.1-py2.6.egg/apptrace/instruments.py", line 207, in trace
    obj_type = obj.__class__.__name__
AttributeError: class rnapar_2 has no attribute '__class__'

What is the expected output? What do you see instead?
Instead of showing the memory usage, an error is raised when  a class object is 
used in the code

What version of the product are you using? On what operating system?
OS X 10.6.4
Python 2.6
Google App Engine 1.4

Please provide any additional information below.
The following is the traceback 

Traceback (most recent call last):
  File "/Users/praveensekar/FYP/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 3245, in _HandleRequest
    self._Dispatch(dispatcher, self.rfile, outfile, env_dict)
  File "/Users/praveensekar/FYP/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 3186, in _Dispatch
    base_env_dict=env_dict)
  File "/Users/praveensekar/FYP/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 531, in Dispatch
    base_env_dict=base_env_dict)
  File "/Users/praveensekar/FYP/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 2410, in Dispatch
    self._module_dict)
  File "/Users/praveensekar/FYP/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 2320, in ExecuteCGI
    reset_modules = exec_script(handler_path, cgi_path, hook)
  File "/Users/praveensekar/FYP/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 2218, in ExecuteOrImportScript
    script_module.main()
  File "/Users/praveensekar/myFYP/gaecode/pknots3/pknots.py", line 289, in main
    run_wsgi_app(application)
  File "/Users/praveensekar/FYP/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/util.py", line 97, in run_wsgi_app
    run_bare_wsgi_app(add_wsgi_middleware(application))
  File "/Users/praveensekar/FYP/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/util.py", line 115, in run_bare_wsgi_app
    result = application(env, _start_response)
  File "/Library/Python/2.6/site-packages/apptrace-0.2.1-py2.6.egg/apptrace/middleware.py", line 116, in wsgi_app
    if record: recorder.trace()
  File "/Library/Python/2.6/site-packages/apptrace-0.2.1-py2.6.egg/apptrace/instruments.py", line 207, in trace
    obj_type = obj.__class__.__name__
AttributeError: class rnapar_2 has no attribute '__class__'

Original issue reported on code.google.com by praveen....@gmail.com on 8 Jan 2011 at 11:01

GoogleCodeExporter commented 8 years ago

Original comment by tobias.r...@gmail.com on 8 Jan 2011 at 11:04

GoogleCodeExporter commented 8 years ago
Fixed in 0.2.2 release. This exception was due to a bug when tracing old style 
class objects.

Original comment by tobias.r...@gmail.com on 8 Jan 2011 at 12:42