Jump to content
avk_tp

WordReference - A multilingual translation dictionary

Recommended Posts

Sorry, I can't help if you don't already have access to an API key. My only suggestion would be to email them to gently express your disappointment and your desire to be notified if they should ever change their new policy.

RIght.. Actually I do have an API key somewhere, inside a time machine backup, I believe. I had to reinstall mavericks and when I took back the alfred backup from dropbox it asked me again for it. Is there a particular location where your extension put this API? It is possible to retrieve it from a backup?

Thanks anyway for the tip, I'll ask them as well! 

Share this post


Link to post

RIght.. Actually I do have an API key somewhere, inside a time machine backup, I believe. I had to reinstall mavericks and when I took back the alfred backup from dropbox it asked me again for it. Is there a particular location where your extension put this API? It is possible to retrieve it from a backup?

Thanks anyway for the tip, I'll ask them as well! 

 

Wordreference should have emailed you the API key originally, no? If you can't find the email they sent you, you need to go to ~/Library/Application Support/Alfred 2/Workflow Data/wordreference, open settings.plist, and then copy the numbers at the end of that line. That's your API. 

Share this post


Link to post

Wordreference should have emailed you the API key originally, no? If you can't find the email they sent you, you need to go to ~/Library/Application Support/Alfred 2/Workflow Data/wordreference, open settings.plist, and then copy the numbers at the end of that line. That's your API. 

 

Got it. Thanks!

Share this post


Link to post

Did anyone else have this workflow break recently? I believe it may have been an OSX 10.10 update but I'm unsure. I've verified my API key is valid and no traffic is being sent out from the script. Any ideas on a fix? I'll dig into the code but am not too familiar with it.

 

Cheers,

Sky

Share this post


Link to post

There was an update for OS X that broke the PHP cli, which means that all of your php workflows and scripts will have broken. (To fix this, you just need to symlink a dylib).

 

But, if you head to the GH repo for this workflow, you'll also see this:

 

 

 

Note: as of 23/06/15 the workflow has stopped functioning. Wordreference.com stopped giving out APIs awhile back, and my guess is that the problem is related to that. I'll take a look in July to see if something else might be the problem though.

Share this post


Link to post

I've poked and prodded at this script without success so far. The API is still returning valid results in my browser when I build the request URL as is done in translate.php, but the somewhere along the line I'm receiving errors such as:

 

 

Starting debug for 'WordReference'

 

[ERROR: alfred.workflow.input.scriptfilter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 4.)'. Row 1, Col 1: 'Document is empty' in XML:

array(3) {

  [19913]=>

  bool(true)

  [10002]=>

  string(54) "http://api.wordreference.com/0.8/MY_API_KEY/json/enfr/hello"

  [74]=>

  bool(true)

}

 

 

I'll update here when I get deeper into this. Might just rebuild with Ruby or Javascript.

Share this post


Link to post

I've poked and prodded at this script without success so far. The API is still returning valid results in my browser when I build the request URL as is done in translate.php, but the somewhere along the line I'm receiving errors such as:

 

 

 

I'll update here when I get deeper into this. Might just rebuild with Ruby or Javascript.

 

That'd be great! Unfortunately I'm really in over my head with the debugging.

Share this post


Link to post

For those who registered for an API while it was still available from WordReference, the current workflow version is back up and running on the latest Alfred release. 

Share this post


Link to post

Hey there, @avk_tp

I'm one of the lucky few who had a API key before WR closed it.

So until recently it worked perfectly, but today I have a weird issue.
First I had an error saying it could mkdir inside…

/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/

…that this folder didn't exist.
So I made the missing folder "Workflow Data" myself and then the workflow was able to write a "wordreference" folder inside but now, it's still not working.
In the debugging console I have

[2018-12-18 16:10:32][input.scriptfilter] Queuing argument 'house'
[2018-12-18 16:10:32][input.scriptfilter] Script with argument '(null)' finished

Don't know what's going on but I tested the API and it's manually responding so it's not that.

If you have any clue, it would very much appreciated. :)
 

Share this post


Link to post

Hey @GoOz,

 

Hmmm, I'm not sure... I can't recreate the issue, as my WR workflow continues to work fine (though I'm on Alfred 3, not 2). Given that the missing Workflow Data folder that initially caused the error message is not unique to this workflow, however, I think my inclination would be to first try a reinstall and see if things get sorted that way. 

Share this post


Link to post
11 hours ago, avk_tp said:

Hey @GoOz,

 

Hmmm, I'm not sure... I can't recreate the issue, as my WR workflow continues to work fine (though I'm on Alfred 3, not 2). Given that the missing Workflow Data folder that initially caused the error message is not unique to this workflow, however, I think my inclination would be to first try a reinstall and see if things get sorted that way. 


Oddly, I'm on Alfred 3 as well (3.7.1 to be exact) 😐

I tried to reinstall on top of it but It wouldn't fix the issue. I just tried to remove the workflow and reinstall it again and… now it works! ☜(゚ヮ゚☜)

Don't know why I didn't think of that before. Sorry for the bother.

Share this post


Link to post
On 12/19/2018 at 9:37 AM, GoOz said:


Oddly, I'm on Alfred 3 as well (3.7.1 to be exact) 😐

I tried to reinstall on top of it but It wouldn't fix the issue. I just tried to remove the workflow and reinstall it again and… now it works! ☜(゚ヮ゚☜)

Don't know why I didn't think of that before. Sorry for the bother.

 

Ah, I'd assumed you were on an older version because I think

/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/

is for Alfred 2, not 3 - so it may be that there was some sort of issue tied to updates or something. In any event, glad it's sorted!

 

Share this post


Link to post

Hey @avk_tp

 

It's me again :D

 

I have the same issue, again.

As Alfred 4 came out,  I decided to clean a little bit, uninstalled Alfred and installed the new version. It turns out I still get the same error for the missing "Alfred 2" folder. I took a look in your code and found this line. I'm starting to think that this is the issue. I also get the `Script with argument '(null)' finished` but one thing at a time. :)

What do you think?

Share this post


Link to post
On 6/3/2019 at 11:58 AM, GoOz said:

Hey @avk_tp

 

It's me again :D

 

I have the same issue, again.

As Alfred 4 came out,  I decided to clean a little bit, uninstalled Alfred and installed the new version. It turns out I still get the same error for the missing "Alfred 2" folder. I took a look in your code and found this line. I'm starting to think that this is the issue. I also get the `Script with argument '(null)' finished` but one thing at a time. :)

 What do you think?

 

Hey hey!

 

Good eye on the Alfred 2 folder issue - I've now updated the relevant lines to use the Alfred 3+ naming conventions. But I think the real problem may actually lie elsewhere, as now I'm getting the same issue you originally had (i.e. with the null return). Not sure what has changed... don't suppose you have any other ideas? :) 

Share this post


Link to post
1 hour ago, avk_tp said:

 

Hey hey!

 

Good eye on the Alfred 2 folder issue - I've now updated the relevant lines to use the Alfred 3+ naming conventions. But I think the real problem may actually lie elsewhere, as now I'm getting the same issue you originally had (i.e. with the null return). Not sure what has changed... don't suppose you have any other ideas? :) 


Sorry I have no clue either. Last time it was "fixed" when I uninstalled and reinstalled the workflow. Didn't try it yet.
But I'm pretty sure it's not related to the request or the WordReference's API itself.

EDIT: I just uninstalled/reinstalled it and the path is now fixed but I still get `Script with argument '(null)' finished` 😢

Edited by GoOz

Share this post


Link to post
4 hours ago, GoOz said:

Script with argument '(null)' finished

 

That’s not an error message, just normal status feedback.

 

Is the workflow not working?

Share this post


Link to post
2 minutes ago, deanishe said:

 

That’s not an error message, just normal status feedback.

 

Is the workflow not working?


No, it doesn't work anymore. And when it worked, it didn't output this feedback that's why I thought it was an error.

Share this post


Link to post
9 minutes ago, GoOz said:

that's why I thought it was an error.

 

It might well be an error, but the message itself doesn’t automatically mean error.

 

If something went badly wrong, Alfred should prefix the message with a large ERROR. Unfortunately, some versions of Alfred always show ERROR, even if nothing went wrong.

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...