Home Download Buy Blog Forum Support

Reloading plugin gives error message

Reloading plugin gives error message

Postby Scam on Tue Nov 12, 2013 11:55 am

I am currently running my plugin whenever ST3 starts. The method is the same that Package Control uses, I call a method in my plugin from plugin_loaded() function after a couple of seconds have passed. When I open ST3 everything works fine. The code is run and no errors appear. However, when I make a modification to my plugin and save it, the plugin is reloaded and I'll get the following error in console:

Code: Select all
reloading plugin myproject.myfile
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 96, in reload_plugin
    obj = t()
TypeError: __init__() missing 1 required positional argument: 'view'

If I go to the file which contains my plugin_loaded() function and save it, the plugin is reloaded without errors. If someone knows a procedure which prevents this error I would be very pleased to hear it.
Scam
 
Posts: 12
Joined: Fri Oct 25, 2013 1:15 pm

Re: Reloading plugin gives error message

Postby Scam on Tue Nov 12, 2013 3:02 pm

As usual the problem was in between the chair and keyboard. After refactoring my own code the error message disappeared.
Scam
 
Posts: 12
Joined: Fri Oct 25, 2013 1:15 pm


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 3 guests