Jump to content
phyllisstein

Things: Search, Show, and Add Tasks

Recommended Posts

Hah, would you believe that in my haste to get a working solution out I left the absolute path to my ~/Library directory in there? It should find your Things properly as of this update: http://alfred.daniel.sh/Workflows/Things.alfredworkflow

Been missing for a while :) but tested this latest version and improvements are great! syntax works great (however not being able to add date i.e. using >+x (being x number of days).

Share this post


Link to post

Any chance of Alleyoop support soon? Given you're the author... ;-)

It supports the latest version of Alleyoop, which was just updated a few hours ago. Any future updates should come through there.

 

Been missing for a while :) but tested this latest version and improvements are great! syntax works great (however not being able to add date i.e. using >+x (being x number of days).

Just put out a fix for that and for problems with tagging. Should work a bit better now.

Share this post


Link to post

It supports the latest version of Alleyoop, which was just updated a few hours ago. Any future updates should come through there.

 

Not for me it doesn't. Just reinstalled as a precaution and to be sure I got the latest version, but here's what I see in Alfred:

 

Missing%20things.jpg

Share this post


Link to post

Not for me it doesn't. Just reinstalled as a precaution and to be sure I got the latest version, but here's what I see in Alfred:

 

Missing%20things.jpg

Hm, when was the last time you downloaded Things? As of now, it's showing up in oop? for me; if I change the version in the workflow's folder, it shows up with oop. You could check to see if there's an update.json file extant, or just try downloading a new copy by hand and seeing if it works any better.

Share this post


Link to post

I'm running Things v2.1.1 from the App Store which I expect is the latest version (no updates reported for some time)

 

Prior to my previous post I downloaded new versions of both the Things and AlleyOop workflows - no change.

 

Yes I do have a update.json file in the workflow folder with the following contents:

 

{
    "version": 2.1,
    "remote_json": "http://alfred.daniel.sh/Updates/Things.json"
}

Share this post


Link to post

Ummm... the latest workflow has also stopped working for me with symptoms as I reported before - get no items listed

 

The version with the binary worked for me after you made a fix (see post #25 of this thread)

Share this post


Link to post

Ummm... the latest workflow has also stopped working for me with symptoms as I reported before - get no items listed

 

The version with the binary worked for me after you made a fix (see post #25 of this thread)

As I've said, "doesn't work" doesn't give me a lot to go on. There are three possible ways to get output from something that "just doesn't work": adding a copy-to-clipboard or Notification Center output to the script filter, or changing the script filter so that it has 2>&1 | tee feedback.log at the end. I usually recommend the last one.

Share this post


Link to post

As said - the symptoms are identical to last time in that I get no output. I just get this:

 

8G4F+.png

 

Nothing further appears and pressing Enter doesn't do anything either. 

Edited by sphardy

Share this post


Link to post

I've done some debugging

 

First, the hard coded path to my Things database (line 14 of feedback.py) is incorrect. (Should be ~/Library/Application Support/Cultured Code/Things/ThingsLibrary.db)

 

Once I corrected that I then got some output indicating an error:

Traceback (most recent call last):
  File "feedback.py", line 118, in <module>
    do_feedback()
  File "feedback.py", line 59, in do_feedback
    icon = os.path.join(alp.local(), "images", "{0}.png".format(area))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u30fb' in position 7: ordinal not in range(128)

Share this post


Link to post

I've done some debugging

 

First, the hard coded path to my Things database (line 14 of feedback.py) is incorrect. (Should be ~/Library/Application Support/Cultured Code/Things/ThingsLibrary.db)

 

Once I corrected that I then got some output indicating an error:

Traceback (most recent call last):
  File "feedback.py", line 118, in <module>
    do_feedback()
  File "feedback.py", line 59, in do_feedback
    icon = os.path.join(alp.local(), "images", "{0}.png".format(area))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u30fb' in position 7: ordinal not in range(128)

Thanks, that's very helpful. Though I hate to see my old nemesis UnicodeEncodeError again. I've reworked the code so that if there's nothing in ~/Library/Containers, it'll use the path you specified (I assumed, incorrectly, that the sandboxed location would be a constant), and tried decoding the Unicode before passing it to os.path.join(), though I'm not positive the solution I tried will be effective. Give it a shot and see if it works any better—I'll keep digging through the documentation on that damned exception in the meantime.

Share this post


Link to post

Progress, but appear to be hitting a similar issue still:

 

Traceback (most recent call last):
  File "feedback.py", line 125, in <module>
    do_feedback()
  File "feedback.py", line 65, in do_feedback
    de_area = area.decode("utf-8", "replace")
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u30fb' in position 7: ordinal not in range(128)

Share this post


Link to post

Progress, but appear to be hitting a similar issue still:

 

Traceback (most recent call last):
  File "feedback.py", line 125, in <module>
    do_feedback()
  File "feedback.py", line 65, in do_feedback
    de_area = area.decode("utf-8", "replace")
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u30fb' in position 7: ordinal not in range(128)

Progress I like! It's possible that I was calling decode on UTF-8 when I should've been calling encode for ASCII. Just spat out a new version; if this one still chokes, there's another codecs module I can try.

Share this post


Link to post

More progress. Now I'm getting the Alfred list and can add tasks once again (no silent failure) so all seems to be working, but need more time to test properly

 

However you made a change previously to force Things to the front when searching, a change that appears to be missing from the applescript snippet in act.py (can't remember the exact code)

 

Could you please add that back?

Share this post


Link to post

Terrific! I'd forgotten about that change when I rolled back to an old Python version; I just added it back in and uploaded a fixed copy. It still leaves Things in the background when adding tasks, since that's the way the Quick Entry panel behaves, but I can adjust that too, or re-add the feedback messages (which felt kind of annoying), if it seems counterintuitive.

Share this post


Link to post

Brilliant - that's Issue #1 fixed  ;) so many thanks for this.

 

Issue #2: As reported, the Things Workflow still doesn't appear to AlleyOop for me. There was an update to AlleyOop (v2.0 - Security Fixes) that I just installed, but the issues remains afterwards

 

For completeness, the update.json file now shows this:

 

{
    "version": 2.13,
    "remote_json": "http://alfred.daniel.sh/Updates/Things.json"
}
Edited by sphardy

Share this post


Link to post

Oh, actually, is there a "debug.log" file in the Alleyoop workflow folder? I added a bunch of logging to the most recent version, so if it's ignoring Things it should tell you why.

Share this post


Link to post

Yes - I have a bunch of entries like this:

[com.danielsh.alfred.alleyoop: Things failed (2013-04-05-10:14:47)]

 

But that is all - nothing to say why there was a failure

Share this post


Link to post

Yup - no problem:

{
    "version": 2.13,
    "download_url": "http://alfred.daniel.sh/Workflows/Things.alfredworkflow",
    "description": "Faster, clearer results; tags, dates fixed; more Unicode fixes."
}

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...