Sublime Forum

Maximum recursion depth breaks plugins?

#1

I wrote a crappy plugin that recursed too far, but it seemed that it took the plugin system down with it. This happened:

RuntimeError: maximum recursion depth exceeded while calling a Python object

And now I get messages like this until I restart Sublime Text:

AttributeError: 'module' object has no attribute 'on_post_save' AttributeError: 'module' object has no attribute 'reload_plugin' AttributeError: 'module' object has no attribute 'create_application_commands' AttributeError: 'module' object has no attribute 'create_text_commands'

repro:

import sublime_plugin class RecursiveListener(sublime_plugin.EventListener): def on_modified(self, view): view.run_command('repeat')

0 Likes