AttributeError
'module' object has no attribute 'b64encode'
If you want to report a bug, please save this page and attach it to your bug report.
Traceback
A problem occurred in a Python script. Here is the
sequence of function calls leading up to the error, in the
order they occurred.
/Users/dmitrijsmilajevs/tmp/moin-1.8/MoinMoin/request/__init__.py
in run
(self=<MoinMoin.request.request_standalone.Request object at 0x68d3d0>)
- 1304 self.page.send_page()
- 1305 else:
- 1306 handler(self.page.page_name, self)
- 1307
- 1308 # every action that didn't use to raise MoinMoinFinish must call this now:
- handler
= <function execute at 0x600f30>
- self
= <MoinMoin.request.request_standalone.Request object at 0x68d3d0>
- self.page
= <MoinMoin.Page.Page object at 0x68d490>
- self.page.page_name
= u'FrontPage'
/Users/dmitrijsmilajevs/tmp/moin-1.8/MoinMoin/action/newaccount.py
in execute
(pagename=u'FrontPage', request=<MoinMoin.request.request_standalone.Request object at 0x68d3d0>)
- 178
- 179 if submitted: # user pressed create button
- 180 request.theme.add_msg(_create_user(request), "dialog")
- 181 return page.send_page()
- 182 else: # show create form
- request
= <MoinMoin.request.request_standalone.Request object at 0x68d3d0>
- request.theme
= <MoinMoin.theme.modern.Theme instance at 0x5fa940>
- request.theme.add_msg
= <bound method Theme.add_msg of <MoinMoin.theme.modern.Theme instance at 0x5fa940>>
- global
_create_user
= <function _create_user at 0x6002b0>
/Users/dmitrijsmilajevs/tmp/moin-1.8/MoinMoin/action/newaccount.py
in _create_user
(request=<MoinMoin.request.request_standalone.Request object at 0x68d3d0>)
- 64 if password and not password.startswith('{SHA}'):
- 65 try:
- 66 theuser.enc_password = user.encodePassword(password)
- 67 except UnicodeError, err:
- 68 # Should never happen
- theuser
= <MoinMoin.user.User at 0x279e40 name:u'test' valid:0>
- theuser.enc_password undefined
- global
user
= <module 'MoinMoin.user' from '/Users/dmitrijsmilajevs/tmp/moin-1.8/MoinMoin/user.py'>
- user.encodePassword
= <function encodePassword at 0x40df30>
- password
= u't1e2s3t4'
/Users/dmitrijsmilajevs/tmp/moin-1.8/MoinMoin/user.py
in encodePassword
(pwd='t1e2s3t4', salt='p\x04!A_\\\x05|d\xe0\xc0,Ef)\xc8\x17f\xa9\xf2')
- 158 hash.update(salt)
- 159
- 160 return '{SSHA}' + base64.b64encode(hash.digest() + salt).rstrip()
- 161
- 162
- global
base64
= <module 'base64' from '/System/Library/Framework...framework/Versions/2.3/lib/python2.3/base64.pyc'>
- base64.b64encode undefined
- hash
= <sha.SHA object at 0x65e720>
- hash.digest
= <built-in method digest of sha.SHA object at 0x65e720>
- salt
= 'p\x04!A_\\\x05|d\xe0\xc0,Ef)\xc8\x17f\xa9\xf2'
- ).rstrip
= <built-in method rstrip of str object at 0x5fd590>
AttributeError
'module' object has no attribute 'b64encode'
- args = ("'module' object has no attribute 'b64encode'",)
System Details
- Date: Thu, 10 Jul 2008 07:15:11 +0000
- Platform: Darwin dmitrijs-milajevs-computer.local 8.11.1 Darwin
Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007;
root:xnu-792.25.20~1/RELEASE_I386 i386
- Python: Python 2.3.5 (/usr/bin/python)
- MoinMoin: Release 1.8.0 (alpha)