I cloned LEAN repo and went through the steps required to build the solution locally. I'm able to run BasicTemplateFrameworkAlgorithm via Launcher so things seem to be working fine.

What I'm struggling with is the Tests project: there seem to be 2 different issues:
- Errors like "LocalDiskMapFileProvider.GetMapFileResolver(sgx): The specified directory does not exist: ../../../Data/equity/sgx/map_files"
- And exception “GIL must always be released”

Tried looking for the solution, but couldn't find any documentation on setting up the data source for the tests (generating data via lean data generate didn't help), and the Python related GIL error is somewhat too generic.

 

Full log below:

========== Test discovery aborted: 0 Tests found in 17.9 sec ==========
Building Test Projects
Starting test discovery for requested test run
========== Starting test discovery ==========
NUnit Adapter 4.6.0.0: Test discovery starting
20250614 22:51:03.187 TRACE:: Config.Get(): Configuration key not found. Key: plugin-directory - Using default value: 
20250614 22:51:03.196 TRACE:: Config.Get(): Configuration key not found. Key: composer-dll-directory - Using default value: 
20250614 22:51:03.197 TRACE:: Composer(): Loading Assemblies from D:\Projects\Lean\Tests\bin\Debug\
20250614 22:51:03.287 TRACE:: Config.GetValue(): zip-data-cache-provider - Using default value: 10
20250614 22:51:03.291 TRACE:: Config.Get(): Configuration key not found. Key: databases-refresh-period - Using default value: 1.00:00:00
20250614 22:51:03.307 TRACE:: Config.Get(): Configuration key not found. Key: version-id - Using default value: 
20250614 22:51:03.307 TRACE:: Config.Get(): Configuration key not found. Key: cache-location - Using default value: 
20250614 22:51:03.309 TRACE:: Config.GetValue(): project-id - Using default value: 0
20250614 22:51:03.309 TRACE:: Config.Get(): Configuration key not found. Key: api-url - Using default value: https://www.quantconnect.com/api/v2/
20250614 22:51:03.309 TRACE:: Config.Get(): Configuration key not found. Key: results-destination-folder - Using default value: D:\Projects\Lean\Tests\bin\Debug
20250614 22:51:03.309 TRACE:: Config.Get(): Configuration key not found. Key: version-id - Using default value: 
20250614 22:51:03.309 TRACE:: Config.Get(): Configuration key not found. Key: cache-location - Using default value: 
20250614 22:51:03.309 TRACE:: Config.GetValue(): project-id - Using default value: 0
20250614 22:51:03.309 TRACE:: Config.Get(): Configuration key not found. Key: api-url - Using default value: https://www.quantconnect.com/api/v2/
20250614 22:51:03.309 TRACE:: Config.Get(): Configuration key not found. Key: results-destination-folder - Using default value: D:\Projects\Lean\Tests\bin\Debug
20250614 22:51:03.309 TRACE:: Config.GetValue(): debug-mode - Using default value: False
20250614 22:51:03.309 TRACE:: Config.Get(): Configuration key not found. Key: python-venv - Using default value: 
20250614 22:51:03.310 TRACE:: PythonInitializer.Initialize(): start...
20250614 22:51:03.431 TRACE:: Config.GetValue(): downloader-data-update-period - Using default value: 7
20250614 22:51:04.299 TRACE:: PythonInitializer.Initialize(): start...
20250614 22:51:04.327 TRACE:: Extensions.IsDirectoryEmpty(): directory '../../../Data/equity/sgx/map_files' not found or empty
20250614 22:51:04.328 ERROR:: LocalDiskMapFileProvider.GetMapFileResolver(sgx): The specified directory does not exist: ../../../Data/equity/sgx/map_files
Unhandled exception. System.InvalidOperationException: GIL must always be released, and it must be released from the same thread that acquired it.
   at Python.Runtime.Py.GILState.Finalize()
   at System.GC.RunFinalizers()
The active test discovery was aborted. Reason: Test host process crashed : 20250614 22:51:04.328 ERROR:: LocalDiskMapFileProvider.GetMapFileResolver(sgx): The specified directory does not exist: ../../../Data/equity/sgx/map_files
Unhandled exception. System.InvalidOperationException: GIL must always be released, and it must be released from the same thread that acquired it.
   at Python.Runtime.Py.GILState.Finalize()
   at System.GC.RunFinalizers()