Trixology

WeatherCat => WeatherCat Integration => Topic started by: monymony on January 28, 2014, 03:02:08 AM

Title: Error with Twitter Applescript
Post by: monymony on January 28, 2014, 03:02:08 AM
Hi All,


I am trying to use the twitter upload script but no matter what I try I just get an error when I attempt to launch the Applescript.  The error that is logged is not particularly helpful but maybe one of you will recognize what is going on.  The error is:



1/27/14 9:50:06.487 PM WC Twitter Uploader[1141]: WeatherCat encountered the following error in posting Twitter data: ' '.


I will point out that I never get prompted to setup the Twitter account so I am suspicious of the "J A Computing libraries" being part of the issue.  I have also confirmed my WC Twitter Uploader prefs.scpt looks correct too.

Any assistance would be greatly appreciated.

Jay

p.s.  As a side note, once this is resolved, I ultimately would like to use the WC Day Summary Twitter script but not do the posts as specified in the WC Twitter Upload script.  Are there any switches/parameters to make this change or does this involve some changes to the AppleScript?
Title: I've seen that "helpful" error (Re: Error with Twitter Applescript)
Post by: elagache on January 28, 2014, 08:21:04 PM
Hi Jay and WeatherCat AppleScript fans,

I am trying to use the twitter upload script but no matter what I try I just get an error when I attempt to launch the Applescript.  The error that is logged is not particularly helpful but maybe one of you will recognize what is going on.  The error is:



1/27/14 9:50:06.487 PM WC Twitter Uploader[1141]: WeatherCat encountered the following error in posting Twitter data: ' '.


I will point out that I never get prompted to setup the Twitter account so I am suspicious of the "J A Computing libraries" being part of the issue.  I have also confirmed my WC Twitter Uploader prefs.scpt looks correct too.

Yup, I've seen those errors too.  Sometimes it is just the Twitter servers that are not working.  I assume that you've tried this repeatedly?

If the problem persists, try replacing the J.A. Computing libraries.  I seem to have forgotten to include them with the latest distribution.  They are attached to this posting so you can grab them here.  Instructions on how to replace the libraries in included in the - you guessed it - WC Twitter Uploader documentation.

p.s.  As a side note, once this is resolved, I ultimately would like to use the WC Day Summary Twitter script but not do the posts as specified in the WC Twitter Upload script.  Are there any switches/parameters to make this change or does this involve some changes to the AppleScript?

Not a problem.  Once more, if you cruise thought the documentation it explains how to modify the text that is posted.  Check out the WC Webtext Uploader docs for an explanation.  Basically what you need to do is modify the WeatherCat web template to say what you want.  You don't need to modify the AppleScript beyond perhaps changing which file is uploaded to Twitter.  Again details in the docs.


Hope this helps.  Let me know if it doesn't!

Cheers, Edouard  [cheers1]

Title: Re: Error with Twitter Applescript
Post by: monymony on January 29, 2014, 03:24:03 AM
Hi Edouard,


Unfortunately no joy.


I tried both replacing those libraries and creating a brand new directory installation from the December 2013 download and still getting the same error.  I have been trying to get past this error for days now and cannot figure out what is going on.  My other AppleScripts are working fine.  I not sure the scripts are even getting to the point to invoke the J A Computing libraries or if they are the are choking immediately upon hitting these libraries.  Could Mavericks be a factor?  Even the logs in Console are pretty useless:



1/28/14 10:06:58.499 PM WC Twitter Uploader[32575]: WC Twitter Uploader (0.9.5) has started.
1/28/14 10:07:02.291 PM WC Twitter Uploader[32578]: Twit string is: CecilWeather conditions at 22:07 EST: Temp: 13 F, Humidity: 45%,  Pressure: 30.32 in-HG, Wind gust: 1.0 mph from the SW, Daily rainfall: 0.0 in
1/28/14 10:07:04.129 PM WC Twitter Uploader[32588]: WeatherCat encountered the following error in posting Twitter data: ' '.


I have no idea what to try next.  Looking for some inspiration!


Jay
Title: Re: Error with Twitter Applescript
Post by: Steve on January 29, 2014, 05:21:38 PM
Twit string is: CecilWeather conditions at 22:07 EST: Temp: 13 F, Humidity: 45%,  Pressure: 30.32 in-HG, Wind gust: 1.0 mph from the SW, Daily rainfall: 0.0 in

Jay,

Try editing your Twitter string. It yields a 143 character post. Usually this just doesn't go anywhere, but maybe it is now showing up as an error.

FWIW, I have all of Edouard's scripts running on Mavericks just fine.

Steve
Title: D'oh, why didn't I do this sooner! (Re: Error with Twitter Applescript)
Post by: elagache on January 29, 2014, 10:56:03 PM
Hi Jay, Steve, and WeatherCat fans,

There is a little AppleScript tool included to allow you to see the string that your current conditions are generating.  I never had it check the length because I have nice tool for getting statistics on strings.  However, D'oh!!! (http://www.canebas.org/Weather/LWC_forum/Custom_emoticons/D%27oh.gif)  Not everybody has that tool!

It is very easy to get AppleScript to compute the length and check if it is over 140 characters.  I just updated the script to do that.  It is attached to this posting.

Give that a try Jay.  That should be mor'bett'r!  ;D

Cheers, Edouard  [cheers1]

P.S. Yeah, I'll eventually get around to making another release of the AppleScripts

Title: Re: Error with Twitter Applescript
Post by: monymony on January 30, 2014, 03:18:34 AM
Hi Steve and Edouard,


Thanks for the utility and in fact I already have been using it.  I had checked the count during some of my testing but I guess one of my reinstalls the defaults came back and the number creeped above 140.  In any case did some quick changes to get down to 130 and still I get that same error.  UGH!


I am not sure if there are many options to debug the AppleScript to step though section by section to track where things go astray.  Any suggestions?


Jay
Title: Re: Error with Twitter Applescript
Post by: monymony on January 30, 2014, 08:00:26 PM

Hi All,

Did some more troubleshooting at lunch and have to wonder if Twitter recent change to require HTTPS access is part of the issue (https://dev.twitter.com/discussions/24239 (https://dev.twitter.com/discussions/24239)).  I have no idea how the ASTwitterLibrary.scpt are making the call.  I did confirm the problem is occurring with the following line in the AppleScript:

TwitterLib's postTweet(twitterName, twitString)

I even changed the parameters to have a 10 character "twitstring" and still nothing.  I did also download a new copy of the TwitterLibrary scripts from http://www.jacomputing.net/ (http://www.jacomputing.net/) just in case and no change. 

So unless there is some strange issue with Mavericks, I am starting to think the problem is with ASTwitterLibrary.scpt  and how it creates new user accounts.  Ideas/suggestions?

Thanks as always,

Jay
Title: ASTwitterLibrary only partially working. (Re: Error with Twitter Applescript)
Post by: elagache on January 30, 2014, 09:17:33 PM
Hi Jay and WeatherCat Twitter fans,

So unless there is some strange issue with Mavericks, I am starting to think the problem is with ASTwitterLibrary.scpt  and how it creates new user accounts.  Ideas/suggestions?

Oops, you may be on to something.  What do you mean "creates new user accounts?"   I'm assume you have registered with Twitter and have a user name and password correct?  Are you referring to the process by which ASTwitterLibrary gets authorized to access your account?

Unfortunately, ASTwitterLibrary remains only partially functional. Jesse of JA Computing was struggling with the changes in the Twitter API and only has about 1/2 of the ASTwitterLibrary working.  However, I wasn't aware if the protocol to authorize ASTwitterLibrary was among the broken bits of API.

I don't know if we have had anybody try to start up a Twitter service since the API upgrade - has anybody done this?

I am a bit puzzled about this, but unfortunately, my AppleScript just hands off the string to ASTwitterLibrary to get the upload to Twitter.  So if indeed there is a problem in the authorization protocol, I'll have to get in touch with Jesse and see where he is at in getting ASTwitterLibrary to work.

Sorry, sending data to Twitter has always been a challenge. . . . . .

Cheers, Edouard
Title: Re: ASTwitterLibrary only partially working. (Re: Error with Twitter Applescript)
Post by: monymony on January 30, 2014, 09:27:21 PM


 What do you mean "creates new user accounts?"   I'm assume you have registered with Twitter and have a user name and password correct?  Are you referring to the process by which ASTwitterLibrary gets authorized to access your account?


Sorry for the confusion... I do have a Twitter account and I am referring to the authorization.


Hope that helps!


Jay
Title: Sent an email to Jesse (Re: Error with Twitter Applescript)
Post by: elagache on January 31, 2014, 09:25:00 PM
Hi Jay and WeatherCat AppleScript fans,

Okay, I'm stumped, so I just sent an email to Jesse at J.A. Computing.  We'll just have to see what he has to say.  Unfortunately, he can be slow in answering emails so I'm afraid this is a case where . . . . .  (http://www.canebas.org/Weather/LWC_forum/Custom_emoticons/patience_emoticon.jpg)  . . . . .  will be necessary!

Cheers, Edouard  [cheers1]
Title: Hopefully a fix soon. (Re: Error with Twitter Applescript)
Post by: elagache on February 04, 2014, 10:30:03 PM
Dear Jay and WeatherCat fans,

I got a reply from Jesse:

Quote
The version you have probably doesn't have the fixes to allow new accounts to be authenticated.  I have some newer patched versions that have that and a bit of other functionality restored.  Still a few API calls giving me trouble.

So hopefully, the wait won't be too much longer.

Cheers, Edouard  [cheers1]
Title: Re: Error with Twitter Applescript
Post by: monymony on February 05, 2014, 02:44:18 AM
Thanks Edouard for the continued follow-up!  At least it looks now that there was nothing wrong with the Applescripts you provided and the way I installed them.


Jay
Title: Re: Hopefully a fix soon. (Re: Error with Twitter Applescript)
Post by: monymony on February 26, 2014, 10:40:16 PM
So hopefully, the wait won't be too much longer.


 [rainyluck]
Title: Sorry, just gave Jesse a nudge. (Re: Error with Twitter Applescript)
Post by: elagache on February 27, 2014, 11:04:04 PM
Hi Jay and WeatherCat Twitter fans,

Sorry, I had noticed that Jesse was a little slow in getting back to me, but I've been bogged down with some of d'em "sekret" agent stuff . . . (http://www.canebas.org/Weather/LWC_forum/Custom_emoticons/spy_smiley.jpg)

So hopefully, the wait won't be too much longer.


 [rainyluck]

I just sent another email to Jesse.  I'll let you know what he says.

Cheers, Edouard  [cheers1]
Title: Still an error . . (Re: Error with Twitter Applescript)
Post by: elagache on March 01, 2014, 12:51:07 AM
Hi Jay and WeatherCat Twitter fans,

I got a reply from Jesse, but alas it didn't turn out as Jesse hoped.  He sent me some revised versions of the libraries.  I installed them in my working copy of the WC Twitter Uploader and it stopped working all together.  I had to roll-back to the older versions of the libraries to get myself back in business.  I reported the result to Jesse and he hasn't gotten back to me yet.

So alas, it appears there are still "issuez" in making this work.  All I can say is . . .

Stay tuned . . . (http://www.canebas.org/Weather/LWC_forum/Custom_emoticons/tune_in_TV_emoticon.gif)

Cheers, Edouard  [cheers1]
Title: Re: Error with Twitter Applescript
Post by: monymony on April 23, 2014, 12:49:50 PM
 [sleep]


Just checking...
Title: Sorry - I'll poke once more. (Re: Error with Twitter Applescript)
Post by: elagache on April 23, 2014, 09:39:28 PM
Hi Jay and WeatherCat scripting fans,

Just checking...

*Sniff*,  :( I've been thinking about your predicament because I had to upgrade my Mac and was a little worried I might have a surprise of my own.

I just sent Jesse another email.  Perhaps there will be better news this time.

Cheers, Edouard
Title: Re: Error with Twitter Applescript
Post by: monymony on May 27, 2014, 11:24:35 PM
 [sleep]


Is it time to wake up yet?
Title: No answer to Apr. 23 email. (Re: Error with Twitter Applescript)
Post by: elagache on May 28, 2014, 10:20:09 PM
Hi Jay and WeatherCat Twitter fans,

Is it time to wake up yet?

*Sniff*, Jesse didn't even bother to reply to my last email of April 23.  I'll try again but clearly he has run into some sort of a serious obstacle.

Definitely a serious bummer dude.

Cheers, Edouard
Title: No answer to May 28 email. (Re: Error with Twitter Applescript)
Post by: elagache on June 10, 2014, 10:17:31 PM
Dear Jay and WeatherCat script fans,

Sorry to report, but Jesse has not replied to my latest email of May 28th.  In it basically I asked if the situation was hopeless.  He has not answered that the situation is indeed hopeless, but clearly his coding efforts aren't going his way.

Sorry, "such are the conditions that prevail . . . . . "

Edouard
Title: New version in hands of beta-testers (Re: Error with Twitter Applescript)
Post by: elagache on September 22, 2014, 09:29:11 PM
Dear WeatherCat Twitter fans,

Jay has gotten back to me and I've sent him a copy of my updated version of WC Twitter Uploader.  Steve also expressed interest in giving the update a try so he has a copy as well.  Hopefully this new version won't be any harder to use than the old one.

The code signing feature may give us some headaches.  I ran a quick test on my old Mac Book which still has Snow Leopard on it and AppleScript applications still run, but are treated as run-only.  In the next release I'll include a repository of the program in pure AppleScript form so that everyone can get access to the code.  There may be other problems lurking in the background.  We'll just have to wait and see!

Cheers, Edouard  [cheers1]