#8774 closed defect (fixed)
KeyError: acct_mgr.web_ui after failed import of acct_mgr.web_ui
Reported by: | Owned by: | Steffen Hoffmann | |
---|---|---|---|
Priority: | normal | Component: | AccountManagerPlugin |
Severity: | blocker | Keywords: | regression |
Cc: | Trac Release: | 0.12 |
Description
This happens in Trac 0.12.2 After installing AccountManager Plugin this error appears when I navigate to the plugins page in the admin or if I enable the acct_mgr.web_ui.LoginModule.
KeyError: acct_mgr.web_ui
Attachments (0)
Change History (9)
comment:1 Changed 14 years ago by
Keywords: | needinfo added |
---|
comment:2 Changed 14 years ago by
Trac: fresh install of 0.12.2, in a virtualenv with --no-site-packages setup with apache and mod_wgsi. AccountManagerPlugin: trunk version.
Scenario 1
- Installed the plugin but not enabled anywhere
- Everything works fine in normal pages
- When navigating to the plugin page in web admin
- Error appears in plugin page
Scenario 2
- Installed the plugin and enabled the plugin in trac.ini
- Yes, trac.web.auth.LoginModule was disabled
- Error appears in all pages
Error is found in /var/log/apache2/trac-error.log which I setup to log trac errors according to this guide.
I will post a trac log as soon as possible.
comment:4 Changed 14 years ago by
Okay, here is the Trac Exception:
---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 42866) Traceback (most recent call last): File "/usr/lib/python2.7/SocketServer.py", line 582, in process_request_thread self.finish_request(request, client_address) File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python2.7/SocketServer.py", line 639, in __init__ self.handle() File "/usr/lib/python2.7/BaseHTTPServer.py", line 343, in handle self.handle_one_request() File "/home/likewise-open/ALLIEDINSURE/amjad/tracenv/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/web/wsgi.py", line 189, in handle_one_request gateway.run(self.server.application) File "/home/likewise-open/ALLIEDINSURE/amjad/tracenv/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/web/wsgi.py", line 89, in run response = application(self.environ, self._start_response) File "/home/likewise-open/ALLIEDINSURE/amjad/tracenv/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/web/standalone.py", line 90, in __call__ return self.application(environ, start_response) File "/home/likewise-open/ALLIEDINSURE/amjad/tracenv/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/web/main.py", line 479, in dispatch_request return _dispatch_request(req, env, env_error) File "/home/likewise-open/ALLIEDINSURE/amjad/tracenv/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/web/main.py", line 555, in _dispatch_request send_internal_error(env, req, sys.exc_info()) File "/home/likewise-open/ALLIEDINSURE/amjad/tracenv/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/web/main.py", line 579, in send_internal_error plugins = [p for p in get_plugin_info(env) File "/home/likewise-open/ALLIEDINSURE/amjad/tracenv/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/loader.py", line 141, in get_plugin_info module = sys.modules[component.__module__] KeyError: 'acct_mgr.web_ui' ----------------------------------------
I just did a new install, Ubuntu 11.04, linux kernel 2.6.38-8-generic x86_64 Python 2.7.1+ Babel 0.9.5 Trac 0.12.2 AccountManagerPlugin trunk
These are my exact commands: :~$ virtualenv --no-site-packages ~/tracenv :~$ source ~/tracenv/bin/activate (tracenv):~$ easy_install Babel==0.9.5 (tracenv):~$ easy_install Trac (tracenv):~$ mkdir ~/trac (tracenv):~$ trac-admin ~/trac/test (tracenv):~$ tracd --port 8000 ~/trac/test # test, it works (tracenv):~$ easy_install https://trac-hacks.org/svn/accountmanagerplugin/trunk (tracenv):~$ tracd --port 8000 ~/trac/test # test, plugin page doesn't work
I haven't tried after enabling the plugin but I'm pretty sure the same will happen just like last time.
I am also going to test with python 2.6 a little later. Thanks
comment:5 Changed 14 years ago by
Sorry about the previous post, here are the commands correctly formatted.
These are my exact commands:
:~$ virtualenv --no-site-packages ~/tracenv :~$ source ~/tracenv/bin/activate (tracenv):~$ easy_install Babel==0.9.5 (tracenv):~$ easy_install Trac (tracenv):~$ mkdir ~/trac (tracenv):~$ trac-admin ~/trac/test (tracenv):~$ tracd --port 8000 ~/trac/test # test, it works (tracenv):~$ easy_install https://trac-hacks.org/svn/accountmanagerplugin/trunk (tracenv):~$ tracd --port 8000 ~/trac/test # test, plugin page doesn't work
comment:6 Changed 14 years ago by
Keywords: | regression added; needinfo removed |
---|---|
Severity: | normal → blocker |
Status: | new → assigned |
Summary: | KeyError: acct_mgr.web_ui → KeyError: acct_mgr.web_ui after failed import of acct_mgr.web_ui |
Ok, silly me. This is a regression caused by the config.get*
calls introduced in changeset [10169].
Your quote from log file was just a result of failed import of acct_mgr.web_ui
module. Lessons learned:
- Do (better) testing of any change, how trivial it might ever look.
- Check beginning with
-------------------------------- environment startup [Trac 0.13dev] --------------------------------
Sorry, this will be fixed in a few minutes. I leave it up to you to close this ticket, if you can confirm that the issue is really fixed for you too.
comment:7 Changed 14 years ago by
(In [10176]) AccountManagerPlugin: Fix reading of configuration in LoginModule
, refs #8774.
This is a rework of changeset [10169] which added some reportedly broken code. Now we use module variables instead of that defined on class level. This should even work with Trac < 0.12, where the requested values are not defined.
comment:8 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I have updated and checked that it indeed works.
Thank you very much.
comment:9 Changed 14 years ago by
Glad to hear that. Thank you for taking care by instant report and testing the fix.
Certainly you did comply to the explicit advice for configuration and disabled Trac's own web login page, didn't you?
What version of AcctMgr did you (try to) install exactly? Where did you take the error message from, the browser window, a error message box, trac.log, ...? I'll need something more to reproduce, if it's not an installation and configuration issue at your side.