From: Steven P. <n9...@n9...> - 2003-12-05 03:31:08
|
On Dec 4, 2003, at 3:27 PM, Roger Binns wrote: >> VERY Strange... I didn't change that bit of code except to make it >> wx.lib.pubsub isntead of wxPython.lib.pubsub. It was importing >> Publication in the code I had downloaded from CVS. > > The word 'Publication' doesn't show up in any greps. It does > import Publisher. I must have made a typo when I composed the original email. Sorry for the confusion. ;-) >> Well, it's a good use of my time if it allows me to use the project >> on >> my system, which I cannot use otherwise. ;-) > > You seem to be saying that standard wxPython 2.4 doesn't work. > I was under the impression it does work fine on Macs. There > may be some glitches, but I will happily fix those. One > example is that multi-line text boxes on Windows default to > about 10 lines in length, whereas on Linux they defautl to zero. > There will be stuff like that and I will certainly fix it > if I know about it! I installed all the packages/binaries as described on the MacOS X page link on the bitpim page. It would not run. I don't know what dependency/etc the problem was with, I just know that I am doing development work (wxWindows on the Mac) that requires features only in the 2.5.x tree, so that is why I'm down this road. I'm not implying anything about the other versions, I haven't tested them extensively nor did I spend time trying to ferret out the problems. One last question, and if you think this is due to 2.5.x changes, I'll punt... Still errors when doing the pubsub stuff, updated to CVS file versions: pubsub.py,v 1.3 2003/12/03 10:55:22 rogerb phonebook.py,v 1.33 2003/12/04 04:27:39 rogerb phonebookentryeditor.py,v 1.9 2003/12/03 10:54:56 I receive this error still: (again, I'm just learning Python, so I'm having a hard time grokking some bits) An unexpected exception has occurred. Please see the help for details on what to do. Traceback (most recent call last): File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 239, in OnClose self.goforit() File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 236, in goforit self.app.makemainwindow() File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 315, in makemainwindow frame=MainWindow(None, -1, "BitPim", self.config) File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 524, in __init__ self.OnPopulateEverythingFromDisk() File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 792, in OnPopulateEverythingFromDisk self.phonewidget.populate(results) File "/Users/n9yty/my_cvs/bitpim/bitpim/phonebook.py", line 542, in populate pubsub.publish(pubsub.MERGE_CATEGORIES, dict.get('categories', [])) File "/Users/n9yty/my_cvs/bitpim/bitpim/pubsub.py", line 72, in publish Publisher.sendMessage(topic, data) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/wx/lib/pubsub.py", line 141, in sendMessage subscriber[2](message) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/wx/lib/pubsub.py", line 169, in <lambda> return lambda m, f=function: f(m) File "/Users/n9yty/my_cvs/bitpim/bitpim/pubsub.py", line 57, in call return self.__call__(argument) File "/Users/n9yty/my_cvs/bitpim/bitpim/pubsub.py", line 51, in __call__ return getattr(obj, self.methodname)(*args, **kwargs) File "/Users/n9yty/my_cvs/bitpim/bitpim/phonebook.py", line 312, in OnMergeCategories cats=msg.data[:] TypeError: unhashable type Variables by last 6 frames, innermost last Frame publish in /Users/n9yty/my_cvs/bitpim/bitpim/pubsub.py at line 72 topic = ('request', 'mergecategories') data = {} Frame sendMessage in /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ site-packages/wx/lib/pubsub.py at line 141 topic = ('request', 'mergecategories') self = <wx.lib.pubsub.Publisher instance at 0x50e3328> aTopic = <Topic>'request', 'mergecategories'</Topic> subscriber = (<bound method _weaklistener.call of <pubsub._weaklistener i topicList = [(<bound method _weaklistener.call of <pubsub._weaklistener message = <wx.lib.pubsub.Message instance at 0x8918918> data = {} Frame <lambda> in /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ site-packages/wx/lib/pubsub.py at line 169 m = <wx.lib.pubsub.Message instance at 0x8918918> f = <bound method _weaklistener.call of <pubsub._weaklistener in Frame call in /Users/n9yty/my_cvs/bitpim/bitpim/pubsub.py at line 57 self = <pubsub._weaklistener instance at 0x50e9620> argument = <wx.lib.pubsub.Message instance at 0x8918918> Frame __call__ in /Users/n9yty/my_cvs/bitpim/bitpim/pubsub.py at line 51 self = <pubsub._weaklistener instance at 0x50e9620> args = (<wx.lib.pubsub.Message instance at 0x8918918>,) obj = <phonebook.CategoryManager instance at 0x50b3b70> kwargs = {} Frame OnMergeCategories in /Users/n9yty/my_cvs/bitpim/bitpim/phonebook.py at line 312 msg = <wx.lib.pubsub.Message instance at 0x8918918> self = <phonebook.CategoryManager instance at 0x50b3b70> It seems to hinge on this part: File "/Users/n9yty/my_cvs/bitpim/bitpim/phonebook.py", line 312, in OnMergeCategories cats=msg.data[:] TypeError: unhashable type From my digging, I have not yet uncovered the most likely cause of this type of error. -. ----. -.-- - -.-- Steve Palm - n9...@n9... -. ----. -.-- - -.-- |