[Moin-devel] [ moin-Bugs-969500 ] UnpicklingError undeclared in 1.2.2

SourceForge.net noreply at sourceforge.net
Wed Jul 21 08:16:04 EDT 2004


Bugs item #969500, was opened at 2004-06-09 12:20
Message generated for change (Comment added) made by thomaswaldmann
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108482&aid=969500&group_id=8482

Category: None
Group: None
>Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Jure Koren (stibbons)
Assigned to: Nobody/Anonymous (nobody)
Summary: UnpicklingError undeclared in 1.2.2

Initial Comment:
SuSE 9, Python 2.3+ (the default for suse 9), apache 2 with 
mod_python 3.1.3.

When creating a new user, I got the NameError about name 
'UnpicklingError' not being defined (the exception is defined in the 
pickle module, but not in the global module scope of user.py).

This is the patch that fixed the problem for me:

--- /home/jure/wiki/moin-1.2.2/build/lib/MoinMoin/user.py       
2004-06-06 01:58:39.000000000 +0200
+++ user.py     2004-06-09 12:02:21.709993524 +0200
@@ -46,7 +46,7 @@
         userdictpickle = os.path.join(config.user_dir, 
"userdict.pickle")
         try:
             _name2id = pickle.load(open(userdictpickle))
-        except (UnpicklingError,IOError,EOFError,ValueError):
+        except (pickle.UnpicklingError,IOError,EOFError,ValueError):
             _name2id = {}
     id = _name2id.get(searchName, None)
     if id is None:


----------------------------------------------------------------------

>Comment By: Thomas Waldmann (thomaswaldmann)
Date: 2004-07-21 17:15

Message:
Logged In: YES 
user_id=100649

fixed in arch and soon in moin 1.2.3


----------------------------------------------------------------------

Comment By: Marijn P. Vriens (marijn)
Date: 2004-06-21 15:50

Message:
Logged In: YES 
user_id=6884

I have stumbled upon the same problem when installing brand
new 1.2.2s. This patch works for me as well. 

----------------------------------------------------------------------

Comment By: Thomas Waldmann (thomaswaldmann)
Date: 2004-06-16 15:31

Message:
Logged In: YES 
user_id=100649

fixed in arch / snapshot

the patch posted in the bug report is valid, everybody
running 1.2.2 release should please fix it like that.

So just add "pickle." (without the quotes) in front of
"UnpicklingError" in user.py.

Sorry for that bug, but we had that code in public testing
in multiple wikis - either nobody noticed or nobody reported
it or it happens only in brand new wikis.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108482&aid=969500&group_id=8482




More information about the Moin-devel mailing list