gingerbeardman Posted June 30 Share Posted June 30 (edited) I'm getting the following error in Rusty Pin pinboard workflow, which works fine in Alfred 4. Obviously the XML is wrong, but as I say it works in Alfred 4. [09:49:08.193] WARNING: Rusty Pin[Script Filter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 65.)'. Row 7, Col 24: 'attributes construct error' in XML: <?xml version="1.0" encoding="UTF-8"?> <items> <item arg="tax" autocomplete="tax"> <title>tax</title> <subtitle>NEW TAG</subtitle> <icon>tag.png</icon> <mod key="ctrl"<mod subtitle="Mark the bookmark as TOREAD."/> <mod key="alt"<mod subtitle="Post the bookmark as private."/> </item> <item arg="syntax" autocomplete="syntax"> <title>syntax</title> <subtitle>4</subtitle> <icon>tag.png</icon> <mod key="alt"<mod subtitle="Post the bookmark as private."/> <mod key="ctrl"<mod subtitle="Mark the bookmark as TOREAD."/> </item> </items> Edited June 30 by gingerbeardman Link to comment Share on other sites More sharing options...
Andrew Posted June 30 Share Posted June 30 The XML parsing hasn't changed between Alfred 4 and Alfred 5, the only difference is Alfred 4 is currently built on Big Sur, and Alfred 5 is built on Monterey. There could be a change to Apple's underlying XML framework which makes it more strict in Monterey. As the Script Filter XML output has long been deprecated, I can't make any significant changes to this code, so the answer here is to update the XML so that it's valid. For anybody reading this who needs to update the XML, the error is in the 4 <mod lines where there is an invalid additional <mod half way through the line. The correct XML would look like this: <?xml version="1.0" encoding="UTF-8"?> <items> <item arg="tax" autocomplete="tax"> <title>tax</title> <subtitle>NEW TAG</subtitle> <icon>tag.png</icon> <mod key="ctrl" subtitle="Mark the bookmark as TOREAD."/> <mod key="alt" subtitle="Post the bookmark as private."/> </item> <item arg="syntax" autocomplete="syntax"> <title>syntax</title> <subtitle>4</subtitle> <icon>tag.png</icon> <mod key="alt" subtitle="Post the bookmark as private."/> <mod key="ctrl" subtitle="Mark the bookmark as TOREAD."/> </item> </items> Cheers, Andrew Link to comment Share on other sites More sharing options...
gingerbeardman Posted June 30 Author Share Posted June 30 (edited) I reported this to the developer. Their workflow is a compiled rust binary so it's not easy for me to change it myself. https://github.com/spamwax/alfred-pinboard-rs/issues/141 uses this engine: https://github.com/spamwax/rusty-pin fingers crossed Edited June 30 by gingerbeardman Link to comment Share on other sites More sharing options...
gingerbeardman Posted June 30 Author Share Posted June 30 (edited) OK, the mystery goes deeper! The author says that the output of the workflow is JSON so how on earth did I get the XML. The answer is that i got it from the Alfred debug panel What's going on here? How can a Workflow that produces JSON be displaying XML in the debug panel? Edited June 30 by gingerbeardman Link to comment Share on other sites More sharing options...
listboss Posted June 30 Share Posted June 30 I am the workflow's author. I think I figured out why you are getting XML. The code checks for older version of Alfred to see if they support JSON vs XML Since you are on a new release of Alfred, it's possible the logic for version check breaks and then code believes it's been run on an older version of Alfred, hence spits out XML. However I have to test this theory to be completely sure. gingerbeardman and Andrew 2 Link to comment Share on other sites More sharing options...
listboss Posted July 4 Share Posted July 4 Hello @Andrew This workflow uses a Rust library that follows semantic versioning, Alfred's early access seems to report its version as "5.0 EA5" which is not a "valid" version. Would it be possible for you, in future releases, to report such versions to be compliant with semantic versioning? something like "5.0.0-EA5" will work. Meanwhile I will push an update to workflow to take care of special version numbers like this. Thanks Link to comment Share on other sites More sharing options...
Andrew Posted July 4 Share Posted July 4 @listboss No problems, I'll make the next build 5.0.0-EA6. Link to comment Share on other sites More sharing options...
gingerbeardman Posted July 4 Author Share Posted July 4 (edited) I'm seeing this? (and Rusty Pin is therefore still busted) Edited July 4 by gingerbeardman Link to comment Share on other sites More sharing options...
Stephen_C Posted July 4 Share Posted July 4 (edited) I think it's possible Andrew intended to refer to 5.0.0-EA7 because the most recent build, as you mention, is EA6 which was released a couple of days ago. Stephen Edited July 4 by Stephen_C To clarify Andrew 1 Link to comment Share on other sites More sharing options...
gingerbeardman Posted July 4 Author Share Posted July 4 Aha, that would make sense! I only got EA6 this morning when I got back into the office. Link to comment Share on other sites More sharing options...
listboss Posted July 5 Share Posted July 5 The latest release of workflow should work now! Please report any issues on its github page. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now