ValueError: list.remove(x): x not in list when partial db-create
On an incomplete database (created by a db-create
that is killed at some point), we get the following traceback when trying to start or shell :
Traceback (most recent call last):
File "/usr/bin/cubicweb-ctl", line 11, in <module>
load_entry_point('cubicweb==3.28.3', 'console_scripts', 'cubicweb-ctl')()
File "/usr/lib/python3/dist-packages/cubicweb/cwctl.py", line 830, in run
CWCTL.run(args)
File "/usr/lib/python3/dist-packages/logilab/common/clcommands.py", line 149, in run
sys.exit(command.main_run(args, rcfile))
File "/usr/lib/python3/dist-packages/logilab/common/clcommands.py", line 290, in main_run
self.run(args)
File "/home/cubicweb/.local/lib/python3.7/site-packages/cubicweb_francearchives/ccplugin.py", line 554, in run
with admincnx(appid) as cnx:
File "/home/cubicweb/.local/lib/python3.7/site-packages/cubicweb_francearchives/__init__.py", line 356, in admincnx
repo.bootstrap()
File "/usr/lib/python3/dist-packages/cubicweb/server/repository.py", line 406, in bootstrap
config.init_cubes(self.get_cubes())
File "/usr/lib/python3/dist-packages/cubicweb/server/repository.py", line 674, in get_cubes
cubes.remove('cubicweb')
ValueError: list.remove(x): x not in list
Having a more explicit error would help to debug these sort of situations !