<#19502 Could not initialize store for cache - Pan...
# github-notifications
c
#19502 Could not initialize store for cache - Pants 2.16 Issue created by sandeep2357 Describe the bug I have a Django microservices project using folder structure as mentioned in this repo. The pants system is working fine in local system. Now i want to deploy the same code to Windows Server 2019 using WSL with ubuntu 20.04. But when i tried running the commands, the pants build system is saying that it could not initialize cache. The exact error even when tried with
pants help
is given below.
ValueError: Could not initialize store for cache: "Error creating/opening content database at "/home/saas/.cache/pants/lmdb_store/cache/4": MDB_CORRUPTED: Located page was wrong type"
The entire error stack trace is given in additional info. I even tried deleting the cache folder at
~/.cache/pants/
and run the command but again the same error. Please help me resolve this or suggest any other workaround. Pants version 2.16.0 OS WSL for windows withUbuntu 20.04 Additional Info Python - 3.11.4 The stack trace of the error:
121056.01 [INFO] waiting for pantsd to start...
Traceback (most recent call last):
File "/home/saas/.cache/nce/c55ee58a557d20bd4b109870e5a01b264c0d501ce817cce29502b2552903834d/bindings/venvs/2.16.0rc0/bin/pants", line 10, in
sys.exit(main())
File "/home/saas/.cache/nce/c55ee58a557d20bd4b109870e5a01b264c0d501ce817cce29502b2552903834d/bindings/venvs/2.16.0rc0/lib/python3.9/site-packages/pants/bin/pants_loader.py", line 123, in main
PantsLoader.main()
File "/home/saas/.cache/nce/c55ee58a557d20bd4b109870e5a01b264c0d501ce817cce29502b2552903834d/bindings/venvs/2.16.0rc0/lib/python3.9/site-packages/pants/bin/pants_loader.py", line 108, in main
cls.run_alternate_entrypoint(entrypoint)
File "/home/saas/.cache/nce/c55ee58a557d20bd4b109870e5a01b264c0d501ce817cce29502b2552903834d/bindings/venvs/2.16.0rc0/lib/python3.9/site-packages/pants/bin/pants_loader.py", line 85, in run_alternate_entrypoint
entrypoint_fn()
File "/home/saas/.cache/nce/c55ee58a557d20bd4b109870e5a01b264c0d501ce817cce29502b2552903834d/bindings/venvs/2.16.0rc0/lib/python3.9/site-packages/pants/pantsd/pants_daemon.py", line 237, in launch_new_pantsd_instance
daemon = PantsDaemon.create(options_bootstrapper)
File "/home/saas/.cache/nce/c55ee58a557d20bd4b109870e5a01b264c0d501ce817cce29502b2552903834d/bindings/venvs/2.16.0rc0/lib/python3.9/site-packages/pants/pantsd/pants_daemon.py", line 78, in create
core = PantsDaemonCore(options_bootstrapper, executor.to_borrowed(), cls._setup_services)
File "/home/saas/.cache/nce/c55ee58a557d20bd4b109870e5a01b264c0d501ce817cce29502b2552903834d/bindings/venvs/2.16.0rc0/lib/python3.9/site-packages/pants/pantsd/pants_daemon_core.py", line 52, in init
self._options_initializer = OptionsInitializer(options_bootstrapper, executor)
File "/home/saas/.cache/nce/c55ee58a557d20bd4b109870e5a01b264c0d501ce817cce29502b2552903834d/bindings/venvs/2.16.0rc0/lib/python3.9/site-packages/pants/init/options_initializer.py", line 103, in init
self._bootstrap_scheduler = create_bootstrap_scheduler(options_bootstrapper, executor)
File "/home/saas/.cache/nce/c55ee58a557d20bd4b109870e5a01b264c0d501ce817cce29502b2552903834d/bindings/venvs/2.16.0rc0/lib/python3.9/site-packages/pants/init/options_initializer.py", line 75, in create_bootstrap_scheduler
EngineInitializer.setup_graph(
File "/home/saas/.cache/nce/c55ee58a557d20bd4b109870e5a01b264c0d501ce817cce29502b2552903834d/bindings/venvs/2.16.0rc0/lib/python3.9/site-packages/pants/init/engine_initializer.py", line 199, in setup_graph
return EngineInitializer.setup_graph_extended(
File "/home/saas/.cache/nce/c55ee58a557d20bd4b109870e5a01b264c0d501ce817cce29502b2552903834d/bindings/venvs/2.16.0rc0/lib/python3.9/site-packages/pants/init/engine_initializer.py", line 342, in setup_graph_extended
scheduler = Scheduler(
File "/home/saas/.cache/nce/c55ee58a557d20bd4b109870e5a01b264c0d501ce817cce29502b2552903834d/bindings/venvs/2.16.0rc0/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 218, in init
self._py_scheduler = native_engine.scheduler_create(
ValueError: Could not initialize store for cache: "Error creating/opening content database at "/home/saas/.cache/pants/lmdb_store/cache/4": MDB_CORRUPTED: Located page was wrong type"
pantsbuild/pants