Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 3rd, 2007, 7:39 AM   #1
dezza
Newbie
 
dezza's Avatar
 
Join Date: Mar 2005
Location: Denmark
Posts: 16
Rep Power: 0 dezza is on a distinguished road
Send a message via ICQ to dezza Send a message via MSN to dezza
Fixing libgmail pipe-menu for Openbox window-manager

Hey guys. I though I was clever, and took my basic Python skills, that I got for one year ago, reading trough some tutorials and stuff.. I digged into this simple pipe-menu for the window-manager Openbox, that shows if you have new messages in GMail in the right-click Openbox menu.

I quickly found out, that the newest version wouldn't work, the only one that worked, was the slow 0.1 proof-of-concept code.

Old code (works): http://gamma.pnosker.com/files/gmail-openbox-0.0.1.py

New code (crashes): http://gamma.pnosker.com/files/gmail-openbox-0.0.3.1.py

I tried running both in Python instead of trough Openbox, and the latest code (0.0.3.1) gives me this: http://pastebin.com/m71cec523
I was wondering what in the new code makes it behave like this? I think that it looks like using the same functions with same parameters, but I couldn't find a trace of those errors.

If I try to run it as the pipe-menu (which of course doesn't work neither) Openbox says this: http://pastebin.com/m339e39d2
Hehe, Openbox' error message is quite weird, cause of course the file exists, I replaced it myself, it just won't work, but claiming it doesn't exist is a lie, and maybe a coding issue of Openbox itself.

I would really appreciate this, not only because of helping me, but also to help me understand this code and why it errors.
__________________
Come in and have a talk!
#programmingforums @ Freenode

Specialities: Linux, XHTML/HTML and CSS.
Learning: Python

Folding@Home Stats

System Requirements: Windows 9x/ME/2000/XP or better
Okay, that makes it run on Linux right?
dezza is offline   Reply With Quote
Old Dec 3rd, 2007, 11:49 AM   #2
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,885
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Re: Fixing libgmail pipe-menu for Openbox window-manager

If self.opener for the GmailAccount class is None, that means it hasn't yet been defined ater it was initiated to None in the __init__ method. It will most oftenly be redefined in one of the first methods called, such as ga.login(). So make sure that is being called successfully. You can also tear apart the libgmail code to see when exactly self.opener is assigned None, and when it is assigned a urllib2() instance.

Also, are you aware that gmail recently changed its UI? I actually submitted a bug change to fix this problem for this very same module (libgmail), but I'm not sure if the developers appended my revision yet. If libgmail works in your old code, make sure you are including the same libgmail in both your old and new code. You may be experiencing problems related to this change.
Sane is offline   Reply With Quote
Old Dec 3rd, 2007, 4:10 PM   #3
dezza
Newbie
 
dezza's Avatar
 
Join Date: Mar 2005
Location: Denmark
Posts: 16
Rep Power: 0 dezza is on a distinguished road
Send a message via ICQ to dezza Send a message via MSN to dezza
Re: Fixing libgmail pipe-menu for Openbox window-manager

Yes but I did use the newest libgmail. The latest version of that menu is from 2005 as what I've seen one place.
__________________
Come in and have a talk!
#programmingforums @ Freenode

Specialities: Linux, XHTML/HTML and CSS.
Learning: Python

Folding@Home Stats

System Requirements: Windows 9x/ME/2000/XP or better
Okay, that makes it run on Linux right?
dezza is offline   Reply With Quote
Old Dec 3rd, 2007, 4:12 PM   #4
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,885
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Re: Fixing libgmail pipe-menu for Openbox window-manager

When I said recently, I meant very recently. About 2 weeks ago I think.

If they are both identical libgmails you're importing, let me know and I'll look more closely when I have time.
Sane is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Popup Menu titaniumdecoy Java 7 Mar 12th, 2006 11:17 AM
Download Blocker Finished - Random Text in Window Title? bigguy Visual Basic 1 Jan 13th, 2006 1:05 PM
dropdown menu with persistence? kerriganm HTML / XHTML / CSS 11 Dec 17th, 2005 2:33 PM
Arranging Views of Project Explorer, Property window and Form Layout java_roshan Visual Basic 6 Sep 30th, 2005 2:55 PM
Need help with a realtime branching menu Zeteg JavaScript and Client-Side Browser Scripting 11 Aug 27th, 2005 11:36 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:52 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC