
Re: Moving Plugin to Plugins (Disabled) on Syntax Error
Hi Matt,
You're right, I didn't explain it properly. You already solved my problem with the alias idea but I'll better explain myself so you can understand the change in behavior I've noticed.
My usual workflow is:
1. Disable Plugin
2. Open plugin's files for editing from the "Plugins (Disabled)" folder.
3. Edit Code
4. Save changes to code
5. Enable Plugin to test code changes - Indigo moves Plugin folder to "Plugins"
6. Disable Plugin - Indigo moves Plugin folder back to "Plugins (Disabled)".
7. Repeat steps 3 thru 6 as I work on the plugin
The problem is if the plugin fails to initialize, like this for example ...
Plugin "DSC Alarm" connected
DSC Alarm Error Error in plugin execution InitializeMain:
Traceback (most recent call last):
File "plugin.py", line 12, in <module>
<type 'exceptions.SyntaxError'>: ('invalid syntax', ('/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/DSC Alarm.indigoPlugin/Contents/Server Plugin/DSC.py', 8, 6, 'class\n'))
Error plugin "DSC Alarm 1.0.6" failed to initialize
Disabling plugin "DSC Alarm 1.0.6"
Stopping plugin "DSC Alarm 1.0.6" (pid 91479)
Plugin "DSC Alarm" disconnected
Indigo disconnects the plugin. I can't execute step 6 to disable the plugin because it seems to have already been disabled. If I pull down the plugin's menu it only says Enable. My plugin's folder is still located in the Plugins folder, it is never moved to Plugins (Disabled). So when I edit my code to resolve the error and then try to save it, BBEdit throws an error saying it can't find the file on the server, because of course it's still in the Plugins folder.
Unless I'm losing it, this behavior has changed recently. I used to able to select Disable no matter what the error was.
Using your idea with aliases is a more elegant solution.
Thanks