QuantConnect/lean-cli

Exception initializing QuantBook() on local research notebook

Closed this issue · 1 comments

Since the recent docker image updates, the following exception is thrown when trying to initialize QuantBook()

Launching a terminal on the docker yields that the mentioned folder '/Lean/Launcher/Data' doesn't exists, though '/Lean/Data' does exists and is correctly mounted from the local machine

qb = QuantBook()

DirectoryNotFoundException: Could not find a part of the path '/Lean/Launcher/Data/market-hours/market-hours-database.json'. at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at QuantConnect.Securities.MarketHoursDatabase.FromFile(String path)
at QuantConnect.Securities.MarketHoursDatabase.FromDataFolder(String dataFolder)
at QuantConnect.Securities.MarketHoursDatabase.FromDataFolder()
at QuantConnect.Algorithm.QCAlgorithm..ctor()
at QuantConnect.Research.QuantBook..ctor()
`

Hi @ereztison, we couldn't reproduce the issue on our side.

Please try pulling the latests Docker images, installing the latest LeanCLI and running lean init on an empty folder for your organization. Pull your project, launch the research environment there, and let us know if the issue persists.