#12943 closed defect (cantfix)
Trac broken after trying to install Account manager plugin
Reported by: | Owned by: | Steffen Hoffmann | |
---|---|---|---|
Priority: | normal | Component: | AccountManagerPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: |
Description
Hi , I tried to install the account manager plugin for my project, from the admin panel, I went to "extensions" and selected the file install.py I got from: https://trac-hacks.org/wiki/AccountManagerPlugin#DownloadsandSource
Now my track install seems broken, most pages display:
<type 'exceptions.SystemExit'> Python 2.7.5: /usr/bin/python Thu Nov 10 17:17:27 2016 A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred. /usr/lib/python2.7/site-packages/trac/web/_fcgi.py in run(self=<trac.web._fcgi.CGIRequest object>) 568 """Runs the handler, flushes the streams, and ends the request.""" 569 try: => 570 protocolStatus, appStatus = self.server.handler(self) 571 except: 572 traceback.print_exc(file=self.stderr) protocolStatus undefined, appStatus undefined, self = <trac.web._fcgi.CGIRequest object>, self.server = <trac.web._fcgi.WSGIServer object>, self.server.handler = <bound method WSGIServer.handler of <trac.web._fcgi.WSGIServer object>> /usr/lib/python2.7/site-packages/trac/web/_fcgi.py in handler(self=<trac.web._fcgi.WSGIServer object>, req=<trac.web._fcgi.CGIRequest object>) 1258 try: 1259 try: => 1260 result = self.application(environ, start_response) 1261 try: 1262 for data in result: result = None, self = <trac.web._fcgi.WSGIServer object>, self.application = <function dispatch_request>, environ = {'AUTH_TYPE': 'Digest', 'CONTEXT_DOCUMENT_ROOT': '/var/www/cgi-bin/trac.fcgi', 'CONTEXT_PREFIX': '/trac', 'DOCUMENT_ROOT': '/var/www/html', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch', 'HTTP_ACCEPT_LANGUAGE': 'fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'keep-alive', ...}, start_response = <function start_response> /usr/lib/python2.7/site-packages/trac/web/main.py in dispatch_request(environ={'AUTH_TYPE': 'Digest', 'CONTEXT_DOCUMENT_ROOT': '/var/www/cgi-bin/trac.fcgi', 'CONTEXT_PREFIX': '/trac', 'DOCUMENT_ROOT': '/var/www/html', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch', 'HTTP_ACCEPT_LANGUAGE': 'fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'keep-alive', ...}, start_response=<function start_response>) 451 env = env_error = None 452 try: => 453 env = open_environment(env_path, use_cache=not run_once) 454 if env.base_url_for_redirect: 455 environ['trac.base_url'] = env.base_url env = None, global open_environment = <function open_environment>, env_path = '/home/trac-admin/projects/RhinoPiping-dev', use_cache undefined, run_once = True /usr/lib/python2.7/site-packages/trac/env.py in open_environment(env_path='/home/trac-admin/projects/RhinoPiping-dev', use_cache=False) 873 CacheManager(env).reset_metadata() 874 else: => 875 env = Environment(env_path) 876 needs_upgrade = False 877 try: env undefined, global Environment = <class 'trac.env.Environment'>, env_path = '/home/trac-admin/projects/RhinoPiping-dev' /usr/lib/python2.7/site-packages/trac/core.py in __call__(cls=<class 'trac.env.Environment'>, *args=('/home/trac-admin/projects/RhinoPiping-dev',), **kwargs={}) 122 self = cls.__new__(cls) 123 self.compmgr = self => 124 self.__init__(*args, **kwargs) 125 return self 126 self = <trac.env.Environment object>, self.__init__ = <bound method Environment.__init__ of <trac.env.Environment object>>, args = ('/home/trac-admin/projects/RhinoPiping-dev',), kwargs = {} /usr/lib/python2.7/site-packages/trac/env.py in __init__(self=<trac.env.Environment object>, path='/home/trac-admin/projects/RhinoPiping-dev', create=False, options=[]) 282 else: 283 self.verify() => 284 self.setup_config() 285 286 if create: self = <trac.env.Environment object>, self.setup_config = <bound method Environment.setup_config of <trac.env.Environment object>> /usr/lib/python2.7/site-packages/trac/env.py in setup_config(self=<trac.env.Environment object>) 641 from trac.loader import load_components 642 plugins_dir = self.shared_plugins_dir => 643 load_components(self, plugins_dir and (plugins_dir,)) 644 645 def get_templates_dir(self): load_components = <function load_components>, self = <trac.env.Environment object>, plugins_dir = '' /usr/lib/python2.7/site-packages/trac/loader.py in load_components(env=<trac.env.Environment object>, extra_path='', loaders=(<function _load_eggs>, <function _load_py_files>)) 112 113 for loadfunc in loaders: => 114 loadfunc(env, search_path, auto_enable=plugins_dir) 115 116 loadfunc = <function _load_py_files>, env = <trac.env.Environment object>, search_path = ['/home/trac-admin/projects/RhinoPiping-dev/plugins'], auto_enable undefined, plugins_dir = '/home/trac-admin/projects/RhinoPiping-dev/plugins' /usr/lib/python2.7/site-packages/trac/loader.py in _load_py_files(env=<trac.env.Environment object>, search_path=['/home/trac-admin/projects/RhinoPiping-dev/plugins'], auto_enable='/home/trac-admin/projects/RhinoPiping-dev/plugins') 88 (plugin_name, plugin_file)) 89 if plugin_name not in sys.modules: => 90 module = imp.load_source(plugin_name, plugin_file) 91 if path == auto_enable: 92 _enable_plugin(env, plugin_name) module undefined, global imp = <module 'imp' (built-in)>, imp.load_source = <built-in function load_source>, plugin_name = 'setup', plugin_file = '/home/trac-admin/projects/RhinoPiping-dev/plugins/setup.py' /home/trac-admin/projects/RhinoPiping-dev/plugins/setup.py in () 63 'acct_mgr.notification = acct_mgr.notification', 64 ] 65 }, => 66 **extra 67 ) extra = None /usr/lib64/python2.7/distutils/core.py in setup(**attrs={'author': 'Matthew Good', 'author_email': 'trac@matt-good.net', 'cmdclass': {'build': <class trac.dist.build>, 'check_catalog': <class trac.dist.check_catalog>, 'install_lib': <class trac.dist.install_lib>}, 'description': 'User account management plugin for Trac', 'entry_points': {'trac.plugins': ['acct_mgr.admin = acct_mgr.admin', 'acct_mgr.api = acct_mgr.api', 'acct_mgr.db = acct_mgr.db', 'acct_mgr.macros = acct_mgr.macros', 'acct_mgr.htfile = acct_mgr.htfile', 'acct_mgr.http = acct_mgr.http', 'acct_mgr.pwhash = acct_mgr.pwhash', 'acct_mgr.svnserve = acct_mgr.svnserve', 'acct_mgr.web_ui = acct_mgr.web_ui', 'acct_mgr.notification = acct_mgr.notification']}, 'extras_require': {'Babel': 'Babel>= 0.9.5', 'Trac': 'Trac >= 0.12'}, 'install_requires': ['Genshi >= 0.5', 'Trac >= 0.11'], 'license': 'BSD', 'maintainer': 'Steffen Hoffmann', 'maintainer_email': 'hoff.st@web.de', ...}) 138 ok = dist.parse_command_line() 139 except DistutilsArgError, msg: => 140 raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg 141 142 if DEBUG: builtin SystemExit = <type 'exceptions.SystemExit'>, global gen_usage = <function gen_usage>, dist = <setuptools.dist.Distribution instance>, dist.script_name = 'trac.fcgi', msg = DistutilsArgError('no commands supplied',) <type 'exceptions.SystemExit'>: usage: trac.fcgi [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: trac.fcgi --help [cmd1 cmd2 ...] or: trac.fcgi --help-commands or: trac.fcgi cmd --help error: no commands supplied args = ('usage: trac.fcgi [global_opts] cmd1 [cmd1_opts] ...trac.fcgi cmd --help\n\nerror: no commands supplied',) code = 'usage: trac.fcgi [global_opts] cmd1 [cmd1_opts] ...trac.fcgi cmd --help\n\nerror: no commands supplied' message = 'usage: trac.fcgi [global_opts] cmd1 [cmd1_opts] ...trac.fcgi cmd --help\n\nerror: no commands supplied'
Attachments (0)
Change History (6)
comment:1 Changed 8 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 Changed 8 years ago by
Priority: | highest → normal |
---|---|
Resolution: | duplicate → cantfix |
Severity: | critical → major |
Replying to matthieu.arnold@…:
module undefined, global imp = <module 'imp' (built-in)>, imp.load_source = <built-in function load_source>, plugin_name = 'setup', plugin_file = '/home/trac-admin/projects/RhinoPiping-dev/plugins/setup.py' /home/trac-admin/projects/RhinoPiping-dev/plugins/setup.py in ()
That is not an issue with Trac 1.2.
You don't copy setup.py
file to plugin directory. At least, remove /home/trac-admin/projects/RhinoPiping-dev/plugins/setup.py
.
Install a plugin using easy_instal
or pip install
. See wiki:AccountManagerPlugin#DownloadsandSource and wiki:TracPlugins#Fromsource.
comment:3 Changed 8 years ago by
See wiki:TracPlugins#Forasingleproject if you want to use the plugin directory.
comment:4 follow-up: 5 Changed 8 years ago by
Thanks for your answer. I did not copy setup.py to my directory. I did open the extension page on admin panel, then I selected the setup.py file with the open file button.
Also I tried to remove the file from /home/trac-admin/projects/RhinoPiping-dev/plugins/setup.py but it still does the same error.
Any idea?
comment:5 Changed 8 years ago by
Replying to anonymous:
Thanks for your answer. I did not copy setup.py to my directory. I did open the extension page on admin panel, then I selected the setup.py file with the open file button.
That form is to install a plugin (*.egg file or *.py file) via webadmin. The setup.py
is not a plugin.
Also I tried to remove the file from /home/trac-admin/projects/RhinoPiping-dev/plugins/setup.py but it still does the same error.
Remove setup.pyc
and setup.pyo
also if exists. Please restart web server after removing.
Finally, please ask on mailing list and/or IRC channel if you want more supports.
Plugin is not yet compatible with 1.2, see #11915.