Issue #371: kallithea 0.6.0 under python3 crashes when the --log-file option is selected (conservancy/kallithea)

crule issues-reply at bitbucket.org
Fri May 8 18:38:35 UTC 2020


New issue 371: kallithea 0.6.0 under python3 crashes when the --log-file option is selected
https://bitbucket.org/conservancy/kallithea/issues/371/kallithea-060-under-python3-crashes-when

Chris Rule:

If I start kallithea 0.6.0 stable with the --log-file option \(“--log-file=/opt/kallithea/kallithea.log”\), the log file is created but contains a series of gearbox errors \(see below and attached\). Without the --log-file option, the logs go to /var/log/syslog and appear to run correctly.

Logfile:

`2020-05-08 13:31:36.785 ERROR [gearbox] Failed to load application`  
`2020-05-08 13:31:36.785 ERROR [gearbox] 'LazyWriter' object has no attribute 'buffer'`  
`Traceback (most recent call last):`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/gearbox/main.py", line 172, in _run_subcommand`  
`return cmd.run(parsed_args)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/gearbox/command.py", line 31, in run`  
`self.take_action(parsed_args)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/gearbox/commands/serve.py", line 280, in take_action`  
`relative_to=base, global_conf=parsed_vars)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/gearbox/commands/serve.py", line 311, in loadapp`  
`return loadapp(app_spec, name=name, relative_to=relative_to, **kw)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 253, in loadapp`  
`return loadobj(APP, uri, name=name, **kw)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 277, in loadobj`  
`global_conf=global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 302, in loadcontext`  
`global_conf=global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 326, in _loadconfig`  
`return loader.get_context(object_type, name, global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 459, in get_context`  
`section)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 481, in _context_from_use`  
`object_type, name=use, global_conf=global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 412, in get_context`  
`global_conf=global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 302, in loadcontext`  
`global_conf=global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 334, in _loadegg`  
`return loader.get_context(object_type, name, global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 625, in get_context`  
`object_type, name=name)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 651, in find_egg_entry_point`  
`possible.append((entry.load(), protocol, entry.name))`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/pkg_resources/init.py", line 2450, in load`  
`return self.resolve()`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/pkg_resources/init.py", line 2456, in resolve`  
`module = import(self.module_name, fromlist=['name'], level=0)`  
`File "/opt/kallithea/kallithea/kallithea/config/middleware.py", line 16, in <module>`  
`from kallithea.config.app_cfg import base_config`  
`File "/opt/kallithea/kallithea/kallithea/config/app_cfg.py", line 39, in <module>`  
`from kallithea.lib.middleware.permanent_repo_url import PermanentRepoUrl`  
`File "/opt/kallithea/kallithea/kallithea/lib/middleware/permanent_repo_url.py", line 23, in <module>`  
`from kallithea.lib.utils import fix_repo_id_name`  
`File "/opt/kallithea/kallithea/kallithea/lib/utils.py", line 37, in <module>`  
`import mercurial.config`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/mercurial/config.py", line 13, in <module>`  
`from .i18n import _`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/mercurial/i18n.py", line 15, in <module>`  
`from .pycompat import getattr`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/mercurial/pycompat.py", line 149, in <module>`  
`stdout = sys.stdout.buffer`  
`AttributeError: 'LazyWriter' object has no attribute 'buffer'`  
`2020-05-08 13:32:24.814 ERROR [gearbox] Failed to load application`  
`2020-05-08 13:32:24.814 ERROR [gearbox] 'LazyWriter' object has no attribute 'buffer'`  
`Traceback (most recent call last):`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/gearbox/main.py", line 172, in _run_subcommand`  
`return cmd.run(parsed_args)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/gearbox/command.py", line 31, in run`  
`self.take_action(parsed_args)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/gearbox/commands/serve.py", line 280, in take_action`  
`relative_to=base, global_conf=parsed_vars)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/gearbox/commands/serve.py", line 311, in loadapp`  
`return loadapp(app_spec, name=name, relative_to=relative_to, **kw)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 253, in loadapp`  
`return loadobj(APP, uri, name=name, **kw)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 277, in loadobj`  
`global_conf=global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 302, in loadcontext`  
`global_conf=global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 326, in _loadconfig`  
`return loader.get_context(object_type, name, global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 459, in get_context`  
`section)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 481, in _context_from_use`  
`object_type, name=use, global_conf=global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 412, in get_context`  
`global_conf=global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 302, in loadcontext`  
`global_conf=global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 334, in _loadegg`  
`return loader.get_context(object_type, name, global_conf)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 625, in get_context`  
`object_type, name=name)`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/paste/deploy/loadwsgi.py", line 651, in find_egg_entry_point`  
`possible.append((entry.load(), protocol, entry.name))`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/pkg_resources/init.py", line 2450, in load`  
`return self.resolve()`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/pkg_resources/init.py", line 2456, in resolve`  
`module = import(self.module_name, fromlist=['name'], level=0)`  
`File "/opt/kallithea/kallithea/kallithea/config/middleware.py", line 16, in <module>`  
`from kallithea.config.app_cfg import base_config`  
`File "/opt/kallithea/kallithea/kallithea/config/app_cfg.py", line 39, in <module>`  
`from kallithea.lib.middleware.permanent_repo_url import PermanentRepoUrl`  
`File "/opt/kallithea/kallithea/kallithea/lib/middleware/permanent_repo_url.py", line 23, in <module>`  
`from kallithea.lib.utils import fix_repo_id_name`  
`File "/opt/kallithea/kallithea/kallithea/lib/utils.py", line 37, in <module>`  
`import mercurial.config`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/mercurial/config.py", line 13, in <module>`  
`from .i18n import _`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/mercurial/i18n.py", line 15, in <module>`  
`from .pycompat import getattr`  
`File "/opt/kallithea/kallithea-venv/lib/python3.6/site-packages/mercurial/pycompat.py", line 149, in <module>`  
`stdout = sys.stdout.buffer`  
`AttributeError: 'LazyWriter' object has no attribute 'buffer'`




More information about the kallithea-general mailing list