QuantConnect / lean-cli

CLI for running the LEAN engine locally and in the cloud
https://www.lean.io/cli
Apache License 2.0
191 stars 100 forks source link

Extra data: line 1 column 21977 (char 21976) - REOPENED #398

Closed alphaDev23 closed 6 months ago

alphaDev23 commented 6 months ago

Issue was entered yesterday but then prematurely closed.

Upgrade lean to 1.0.177 and I now receive the following error regardless of the lean command , including using --verbose. I run. E.g.,

lean whoami --verbose Extra data: line 1 column 21977 (char 21976) Extra data: line 1 column 21977 (char 21976)

:595 Unexpected """ at column 1 Extra data: line 1 column 21977 (char 21976) Error: :595 Unexpected """ at column 1 Please advise as to which file this error may be coming from and how to fix. As a note, prior versions, down to 1.0.170 also now exhibit the same errors. The issue was not there prior to the upgrade. Same issue yesterday and today.
Martin-Molinero commented 6 months ago

Hey @alphaDev23 Can you please run the command with --verbose and share the entire output?

Edit: There are 2 paths I believe that could leave some invalid config state file after an uninstall, ~/.lean/ & {your python install path}\Lib\site-packages\lean, I'd think it's the first one. Could you try, uninstalling lean, deleting the folder, installing lean and retrying? Will require to relogin

alphaDev23 commented 6 months ago

Running the command with --verbose is in the original post. I will try the suggestion in your edit by this weekend.

Martin-Molinero commented 6 months ago

Running the command with --verbose is in the original post. I will try the suggestion in your edit by this weekend.

Thank you @alphaDev23. Please keep us posted if, and how, ur able to solve the issue. Curious if your using the vscode local platform QC extension too? Trying to determine what could of caused the corruption

alphaDev23 commented 6 months ago

The lean.json file appears to have been corrupted. I ran lean init in another folder, copied the lean.json file to the other folder and it ran without exception.