Search code examples
pythonpython-2.7google-app-enginestackdriver

What does "bound method PythonBreakpoint._ActivateBreakpoint" mean?


I am using python webapp2 (used in GAE). I'm seeing this exception in Logging.

<bound method PythonBreakpoint._ActivateBreakpoint of <google.devtools.cdbg.debuglets.python.python_breakpoint.PythonBreakpoint object at 0x2ab09434da10>>

Traceback (most recent call last):
  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/d22767677e9aa897/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
    rv = self.router.dispatch(request, response)
  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/d22767677e9aa897/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1272, in default_dispatcher
    self.handlers[handler] = handler = import_string(handler)
  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/d22767677e9aa897/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1850, in import_string
    return getattr(__import__(module, None, None, [obj]), obj)
  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/d22767677e9aa897/python27/python27_lib/versions/1/google/devtools/cdbg/debuglets/python/imphook2.py", line 222, in _ImportHookBySuffix
    _ProcessImportBySuffix(name, fromlist, globals)
  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/d22767677e9aa897/python27/python27_lib/versions/1/google/devtools/cdbg/debuglets/python/imphook2.py", line 179, in _ProcessImportBySuffix
    _InvokeImportCallbackBySuffix(_import_local.names)
  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/d22767677e9aa897/python27/python27_lib/versions/1/google/devtools/cdbg/debuglets/python/imphook2.py", line 452, in _InvokeImportCallbackBySuffix
    callback(module)
  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/d22767677e9aa897/python27/python27_lib/versions/1/google/devtools/cdbg/debuglets/python/python_breakpoint.py", line 317, in _ActivateBreakpoint
    self._RemoveImportHook()
  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/d22767677e9aa897/python27/python27_lib/versions/1/google/devtools/cdbg/debuglets/python/python_breakpoint.py", line 398, in _RemoveImportHook
    self._import_hook_cleanup()
  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/d22767677e9aa897/python27/python27_lib/versions/1/google/devtools/cdbg/debuglets/python/imphook2.py", line 109, in RemoveCallback
    callbacks.remove(callback)

KeyError: <bound method PythonBreakpoint._ActivateBreakpoint of <google.devtools.cdbg.debuglets.python.python_breakpoint.PythonBreakpoint object at 0x2ab09434da10>>

Here is my code.

import webapp2
ROUTES = [
    webapp2.Route('/sample', handler='sample_package.SampleClass', methods=['POST']),
...
]

APPLICATION = webapp2.WSGIApplication(
    ROUTES,
    config=config)

This exception does not occur every time.

What does this mean and how can I remove it? Is it a problem?


Solution

  • Are you calling a function without ()?

    a = b.func() or a = b.func?

    You might be returning the reference to the function instead of the output of the function if you don't include the parenthesis.