Data Sources Fix for Installer: Second Try #2718
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Previously, the installer was running into an error where it was not loading in the
data_sources_default.json
correctly.The file is located in
OpenBBUserData
folder on the user's machine, however it is empty. This is on purpose. If the user does not purposefully populate this file in some way, then the terminal should use the default sources provided by OpenBB. This bug demonstrates that this is not the case for the installer. It always looks at the sources file in the user data folder. This PR fixes this by always opening the provided default sources from the correct location first (in the case of the installer.OpenBB/
) and then if there is content within the user data sources file, then it will utilize that.How has this been tested?
This has been tested by creating an installer and doing the following:
OpenBBUserData
data sources file to make sure it fails correctlydata_sources_default.json
to the user data sources file location) to make sure it works correctly.Others