Page 1 of 1

LowLevelBadParameterError -- illegal XML tag name character

PostPosted: Tue Nov 14, 2017 7:03 am
by six50joe
Decided to make my first plugin, for my own personal use as more of a 'library' to share implementation and scripts for the two locations I use Indigo.

I used other plugins as templates for starting mine. I have not been able to find the cause of these errors:
Code: Select all
   Loading plugin "Six50Joe 1.0.3"
   Starting plugin "Six50Joe 1.0.3" (pid 19108)
   Error (client)                  UpdatePluginStatusUI() caught exception: LowLevelBadParameterError -- illegal XML tag name character
   Installing and enabling plugin Six50Joe v1.0.3
   Loading plugin "Six50Joe 1.0.3"
   Starting plugin "Six50Joe 1.0.3" (pid 19108)
   Error (client)                  UpdatePluginStatusUI() caught exception: LowLevelBadParameterError -- illegal XML tag name character
   Six50Joe Error                  Error in plugin execution getDevicesDict: LowLevelBadParameterError -- illegal XML tag name character
   Six50Joe Error                  Error in plugin execution getEventsDict: LowLevelBadParameterError -- illegal XML tag name character
   Six50Joe Error                  Error in plugin execution getActionsDict: LowLevelBadParameterError -- illegal XML tag name character
   Started plugin "Six50Joe 1.0.3"

Nov 14, 2017, 6:51:51 AM
   Schedule                        enclosure lamps ON
   Sent (offline)                  "enclosure heating lamp" on to 85
   Error (client)                  runDialogForMenuAction() caught exception: LowLevelBadParameterError -- illegal character in XML tag name or value


My tag names don't seem to be breaking any of the rules. I've tried installing it in two separate server instances with different configurations, same errors. Also have tried uninstalling / reinstalling the plugin multiple times.


I haven't defined any custom devices or events, and my menu items and actions are pretty minimal right now:
Actions.xml:

Code: Select all
<?xml version="1.0"?>
<Actions>
    <SupportURL>https://myserver.org</SupportURL>
   <Action id="pingOtherHouse">
      <Name>Ping other house</Name>
      <CallbackMethod>pingOtherHouse</CallbackMethod>
      <ConfigUI>
         <Field id="ipOrUrl" type="textfield">
            <Label>IP or URL:</Label>
         </Field>
         <Field id="retrySecs" type="textfield">
            <Label>Seconds between retries:</Label>
         </Field>
         <Field id="numRetries" type="textfield">
            <Label>Number of retries:</Label>
         </Field>
      </ConfigUI>
   </Action>
</Actions>


Menuitems.xml
Code: Select all
<?xml version="1.0"?>
<!-- If your plugin wants to add menu items to it's submenu off the new Extensions menu,
    define them here. Each should have a unique menu id, a Name, and an Action. The last
    is a method name in your python file that will be called when the user selects that
    menu item. Note - nothing will be returned to the client, so if you need to communicate
    back to the user you can post information into the Event Log.
-->
<MenuItems>
    <SupportURL>https://github.com/six50joe/Indigo</SupportURL>
   <MenuItem id="pingOtherHouse">
      <Name>Ping Other House...</Name>
      <ConfigUI actionId="pingOtherHouse"/>
   </MenuItem>
   <MenuItem id="separator2" />
   <MenuItem id="checkPluginUpdates">
      <Name>Check for plugin updates</Name>
      <CallbackMethod>checkPluginUpdates</CallbackMethod>
   </MenuItem>
   <MenuItem id="updatePlugin">
      <Name>Update Plugin</Name>
      <CallbackMethod>updatePlugin</CallbackMethod>
   </MenuItem>
</MenuItems>


PluginConfig.xml

Code: Select all
<?xml version="1.0"?>
<PluginConfig>
   <Field type="menu" id="logLevel" defaultValue="INFO">
      <Label>Log level:</Label>
      <List>
         <Option value="DEBUG">4 - Debug</Option>
         <Option value="INFO">3 - Info</Option>
         <Option value="WARNING">2 - Warnings</Option>
         <Option value="ERROR">1 - Errors</Option>
      </List>
   </Field>
   <Field type="checkbox" id="extensiveDebug" defaultValue="False">
      <Label>Extensive debug log</Label>
   </Field>
   <Field type="label" id="emptylabelUpdates">
      <Label>
      </Label>
   </Field>
</PluginConfig>

Re: LowLevelBadParameterError -- illegal XML tag name charac

PostPosted: Tue Nov 14, 2017 11:53 am
by jay (support)
What are you using to edit the plugin? I wonder if some invisible character got in there somewhere (most editors will have an option to show invisibles). I see there appears to be an extra space ahead of the <SupportURL opening tags - that might be a good place to start.

Also, can you open the Action config dialog for the action?

Re: LowLevelBadParameterError -- illegal XML tag name charac

PostPosted: Tue Nov 14, 2017 3:28 pm
by six50joe
I am able to open the Action config dialog. I'll try your suggestion of looking for invisible characters. I had been using emacs.

Re: LowLevelBadParameterError -- illegal XML tag name charac

PostPosted: Wed Nov 15, 2017 6:02 am
by six50joe
Jay,
I checked for invisible chars- other than than the spaces preceding SupportUrl that you pointed out, there are none. Removing those spaces didn't work.

When I try the 'pingOtherHouse' plugin item, the dialog opens and I can enter values in it, but when I click 'Execute' I get the error:

Error (client) runDialogForMenuAction() caught exception: LowLevelBadParameterError -- illegal character in XML tag name or value

I also checked permissions on the files. They are identical to a plugin that is working that I used as a template for mine.

I've also tried shutting down Indigo, removing the plugin from the Plugins directory, and re-installing it. Is there a way to debug it?

Thanks,
Joe

Re: LowLevelBadParameterError -- illegal XML tag name charac

PostPosted: Wed Nov 15, 2017 8:33 pm
by jay (support)
What are you typing into the text fields on that dialog? Any special characters?

Re: LowLevelBadParameterError -- illegal XML tag name charac

PostPosted: Wed Nov 15, 2017 9:17 pm
by DaveL17
This is a long shot, but it's worth a try.

Change this:
Code: Select all
   <Field type="label" id="emptylabelUpdates">
      <Label>
      </Label>
   </Field>

To this:
Code: Select all
   <Field type="label" id="emptylabelUpdates">
      <Label>" "</Label>
   </Field>

or this:
Code: Select all
   <Field type="label" id="emptylabelUpdates">
      <Label/>
   </Field>

Re: LowLevelBadParameterError -- illegal XML tag name charac

PostPosted: Fri Nov 17, 2017 8:21 am
by six50joe
Tried it, but no change. Is there a way to get more verbose logging to point out where the XML errors are? This morning I started trying a new approach, starting with a copy of the ZEAL plugin, which installs without the errors, and incrementally changing all the parts to my implementation to see if/when it breaks. Will update with my findings after this effort.

Joe

Re: LowLevelBadParameterError -- illegal XML tag name charac

PostPosted: Fri Nov 17, 2017 11:26 am
by matt (support)
Unfortunately, I don't think the logging is going to give you any more details. Your approach of reverting back or copy/pasting chunks from the working plugin is the approach I'd recommend. Let us know what you find.

Re: LowLevelBadParameterError -- illegal XML tag name charac

PostPosted: Mon Nov 27, 2017 2:13 pm
by howartp
If you want to pm me a link to your plugin I’m happy to have a gander.


Sent from my iPhone using Tapatalk Pro