Dreamstime

Tuesday 28 July 2015

RavenPlus Updates - 28th July 2015

Here are some updates on what's happening on my work with RavenPlus and OAuth2 since my last update about 4 weeks ago.

What's Working

I have completed the following functions in RavenPlus:

  1. Insert new post
  2. Update an existing post
  3. Delete an existing post
  4. Downloading recent posts (including Blogger labels)

The time taken for item (4) is a little longer because I had to take a detour to learn about Python's 'list', 'tuple' and 'dictionary'. Otherwise I could not proceed. I never had to in my previous fixes as there wasn't a need to.

Python 2.4 Libraries For OAuth2

I have finally identified the libraries that are required to enable OAuth2 on Python 2.4. They are:

  • httplib2 version 0.9.1

  • simplejson version 2.1.0

  • argparse version 1.3.0

  • uuid version 1.30

  • ssl version 1.16 (requires the 'C' library OpenSSL and libgw32c-0.4-lib.zip too)

  • Google API Client for Python version 1.2

In my haste to enable OAuth2 and after numerous installs and uninstalls (and confusing myself in the process) last month, I could never really pinpoint the exact libraries if I were asked - until now.

I use the MinGW 'C' compiler when installing 'simplejson' and 'ssl' by the way.

Modifications To httplib2

httplib2 and Python 2.4 did not work perfectly. To avoid getting this uninformative error message:

SSLError instance has no attribute 'errno'

I replaced the lines between line 1058 and 1062 in the file "__init__.py" with "raise". Ah!.. Now I can see what's troubling SSL.

py2exe

I am currently working on compiling RavenPlus to a Windows executable with the help of 'py2exe'. I thought that this would be a plain sailing process initially but unfortunately it is not.

  • My first attempt resulted in an error box popping out saying that the file or directory "Share\\default.cat" was not found. Thinking that the Python .egg files is causing this problem, I reinstalled the OAuth2 dependant libraries (except for the Google API Client for Python since I have integrated them into RavenPlus) making sure that they are not in the .egg format. That didn't work. So I tried compiling version 1.0.504 of RavenPlus. And that didn't work either.

    My only conclusion: I must have corrupted my Python setup somewhere, somehow - probably from my numerous installs and uninstalls of various Python libraries, as mentioned above. So ...

  • ... I restored my Python24 directory from backup, reinstalled the libraries for OAuth2 (except for the Google API Client for Python, as I have mentioned above) and again making very well sure that they are not in the .egg format. Things went well - no more complains about "Share\\default.cat" anymore. Except that now upon posting to Blogger I receive this error message:

    ssl.SSLError: (1, '_ssl.c:493: error:0D0C50A1:asn1 encoding routines:ASN1_item_verify:unknown message digest algorithm')

    The reason: Google updated SSL on their end (sometime around 23rd July 2015, I think) and I was using a very outdated version of OpenSSL (version 0.9.8h). Talk about bad timing. So ...

  • ... there is only one thing to do, which is: upgrade my ssl Python library. Easier said than done, but to cut a long story short, I did managed to complete my ssl upgrade to OpenSSL version 1.0.2d (a 9th July 2015 release), after working on it for about a-day-and-a-half while feeling edgy (because I wasn't sure if it is going to work) all the time. So ...

  • ... now, I've got everything all set. Ran the command to build my RavenPlus executable with 'py2exe', and things went smoothly.

    RavenPlus got launched without any errors; composed my test post; hit publish and now a new error message:

    ssl.SSLError: {(185090050, '_ssl.c:338: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib')}

    So ...

  • ... back to work. Luckily, I could still post from my development environment, which is what I am doing here now.












13 comments:

  1. Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! I love you!!!!!
    You're my hero!!!
    Good luck with the compiling on RavenPlus!!!!!!!

    ReplyDelete
  2. Ah! The new posts can send images to Picassa?

    ReplyDelete
    Replies
    1. I am planning a new version release once I have got py2exe working (with the 4 working functions as mentioned in the blog post above).

      Picasa uploads and the rest of the missing functions will come later.

      Delete
    2. Jonathan Wefrest1 August 2015 at 00:35

      But I upload too much photos, I can not use RavenPlus without Picassa :(

      Fix this take too much time?

      Delete
    3. I use PicasaWeb (and Picasa desktop, sometimes) to upload my pictures to Picasa. Then I copy the URL and paste into the Raven+ editor.

      Alternatively, you could use Flickr. It still works as far as I know with Raven and Raven+. And it won't cost you anything.

      Delete
  3. I´m glad to hear good news!!! but I need Picasa too,
    Please! for the rest of the missing functions make Picasa first !!!

    ReplyDelete
    Replies
    1. I going as fast as I possibly could. I have to roll things out in stages. To roll things out as a complete package will take a longer time, that's all.

      Just a reminder: I am fixing Raven+ in my spare time.

      Delete
    2. I can wait, don't problem, but please make Picasa works again.

      Flickr don't work, it needs SSL.

      I used PicasaWeb and Picasa desktop and copy the URL like you said, but it's hard for me 'cause I send more than 60 images for day ( I have a news blog).

      The more easy way for me is have Raven working well with Picasa

      Anyway, thanks for all your work and for use your spare time for Raven

      Delete
    3. The fix to the "SSL is required" problem in Flickr is easy. Just replace "http://" with "https://" in all the calls (there are 5) to the Flickr API in the file

      "Raven\src\python\flickrapi\__init__.py".

      Delete
    4. Thanks, but I have the "normal" Raven with bin, profiles and system folders. Anyway, I can not login in Blogspot without your new Raven, so I will wait for your fix in RavenPlus for blogspot, Flickr, and please, please, please, Picasa
      Thanks for answer me always!!!

      Delete
    5. Next version of Raven+ will be v1.0.505 - with the Flickr 'SSL' fix as previously mentioned. Picture uploads should be workable, unless Flickr change something. I've uploaded a picture myself a couple of days ago with no problems.

      Picasa upload capabilities will only be available in Raven+ v1.0.506. I haven't looked at the API yet.

      Delete
    6. I can't wait for 1.0.505 and work again in my blog!!! . Any aprox. idea when we will have this version?

      And thanks for don't forget Picasa!!!!!

      Thanks for all T.C.!!

      Delete
    7. I need to run some test and trial runs on a bare machine with no Python installed. Then it is just a blog post away.

      Delete