diff --git a/openbb_platform/core/openbb_core/app/version.py b/openbb_platform/core/openbb_core/app/version.py index c53858bf55a..3294ba4a385 100644 --- a/openbb_platform/core/openbb_core/app/version.py +++ b/openbb_platform/core/openbb_core/app/version.py @@ -16,7 +16,12 @@ def get_package_version(package: str): except pkg_resources.DistributionNotFound: package += "-nightly" is_nightly = True - version = pkg_resources.get_distribution(package).version + try: + version = pkg_resources.get_distribution(package).version + except pkg_resources.DistributionNotFound: + package = "openbb-core" + version = pkg_resources.get_distribution(package).version + version += "core" if is_git_repo(Path(__file__).parent.resolve()) and not is_nightly: version += "dev" @@ -42,4 +47,7 @@ def is_git_repo(path: Path): return False -VERSION = get_package_version(PACKAGE) +try: + VERSION = get_package_version(PACKAGE) +except pkg_resources.DistributionNotFound: + VERSION = "unknown" diff --git a/openbb_terminal/stocks/stocks_helper.py b/openbb_terminal/stocks/stocks_helper.py index dff393794f6..1143235a77e 100644 --- a/openbb_terminal/stocks/stocks_helper.py +++ b/openbb_terminal/stocks/stocks_helper.py @@ -4,7 +4,7 @@ __docformat__ = "numpy" # pylint: disable=no-member, too-many-branches, too-many-arguments # pylint: disable=inconsistent-return-statements # pylint: disable=consider-using-dict-items - +# pylint: disable=too-many-lines import logging import os from copy import deepcopy