Modify

Opened 16 years ago

Closed 8 years ago

#5284 closed defect (fixed)

UndefinedError: {'is_trac_managed_hack': False} has no member named "username"

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: UserManagerPlugin
Severity: normal Keywords:
Cc: Ryan J Ollos Trac Release: 0.11

Description (last modified by Ryan J Ollos)

After installation I got this:

Trac detected an internal error: UndefinedError: {'is_trac_managed_hack': False} has no member named "username"

And:

File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 219, in dispatch
  data, content_type)
File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/chrome.py", line 726, in render_template
  stream.render(method, doctype=doctype, out=buffer)
File "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py", line 179, in renderFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py", line 61, in encodeFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py", line 311, in __call__File "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py", line 753, in __call__File "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py", line 592, in __call__File "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py", line 698, in __call__File "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py", line 532, in __call__File "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py", line 283, in _ensureFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py", line 283, in _ensureFile "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/chrome.py", line 779, in _strip_accesskeys
  for kind, data, pos in stream:
File "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py", line 283, in _ensureFile "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/chrome.py", line 768, in _generate
  for kind, data, pos in stream:
File "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py", line 283, in _ensureFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 569, in _includeFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/markup.py", line 298, in _matchFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/markup.py", line 298, in _matchFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/markup.py", line 298, in _matchFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/markup.py", line 245, in _matchFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 543, in _execFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 533, in _evalFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 496, in _evalFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 551, in _flattenFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py", line 283, in _ensureFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/path.py", line 141, in _generateFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 569, in _includeFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/markup.py", line 234, in _stripFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 543, in _execFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 533, in _evalFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 496, in _evalFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 551, in _flattenFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py", line 283, in _ensureFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/path.py", line 141, in _generateFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 569, in _includeFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/markup.py", line 234, in _stripFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 543, in _execFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 533, in _evalFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 496, in _evalFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 551, in _flattenFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py", line 283, in _ensureFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/path.py", line 141, in _generateFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 569, in _includeFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/markup.py", line 234, in _stripFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 543, in _execFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 496, in _evalFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 558, in _flattenFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py", line 551, in _flattenFile "/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/directives.py", line 377, in __call__File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/util/compat.py", line 81, in next
  self.currkey = self.keyfunc(self.currvalue)
File "<string>", line 1, in <lambda.19>File "build/bdist.linux-i686/egg/acct_mgr/api.py", line 114, in has_userFile "build/bdist.linux-i686/egg/acct_mgr/svnserve.py", line 55, in has_userFile "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/config.py", line 251, in __contains__
  if self.config.parser.has_option(self.name, name):
File "/usr/lib/python2.5/ConfigParser.py", line 346, in has_option
  option = self.optionxform(option)
File "/usr/lib/python2.5/ConfigParser.py", line 336, in optionxform
  return optionstr.lower()
System Information:[[BR]]

User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
Trac:	0.11
Python:	2.5.1 (r251:54863, Apr 8 2008, 01:20:16) [GCC 4.3.0 20080404 (Red Hat 4.3.0-6)]
setuptools:	0.6c9
SQLite:	3.5.6
pysqlite:	2.3.3
Genshi:	0.5.1
Subversion:	1.5.1 (r32289)
jQuery:	1.2.3

Attachments (1)

usermanager.diff (1.4 KB) - added by Jun Omae 12 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 13 years ago by Steffen Hoffmann

Cc: Ryan J Ollos added; anonymous removed

Could someone make this description readable by meaningful formatting (Ryan, please help!).

comment:2 Changed 13 years ago by Ryan J Ollos

Description: modified (diff)

Certainly!

comment:3 in reply to:  2 Changed 13 years ago by Steffen Hoffmann

Replying to rjollos:

Certainly!

Ah, much clearer now, thanks.

Changed 12 years ago by Jun Omae

Attachment: usermanager.diff added

comment:4 Changed 12 years ago by Jun Omae

I have the same issue with Trac 0.12.3. If [trac] ignore_auth_case is true, it happens.

usermanager.diff is ad-hoc patch for the issue.

comment:5 Changed 12 years ago by Steffen Hoffmann

(In [11640]) UserManagerPlugin: Fix issue a template issue, refs #5284.

The test in embedded python code obviously bails out when evaluating a dict without the 'username' key. While the real change will cope with the root cause of key renaming username -> user, this change will make at least this template more robust, and thats a good thing - too easy to ignore.

Thanks to Jun Omae for the suggestion.

comment:6 Changed 11 years ago by Ryan J Ollos

Owner: changed from Catalin BALAN to Ryan J Ollos
Status: newassigned

comment:7 Changed 8 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.