Skip to content

[Bug] Import Error: using obb.equity.price.historical() #7113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jjfantini opened this issue May 8, 2025 · 13 comments
Open

[Bug] Import Error: using obb.equity.price.historical() #7113

jjfantini opened this issue May 8, 2025 · 13 comments

Comments

@jjfantini
Copy link

jjfantini commented May 8, 2025

Describe the bug
When I create a new environment with UV and add openbb to the env. Upon import and using the obb module, I get a weird Import error.

To Reproduce
Install uv and python 3.12.10 in a micromamba env
Create a uv .venv using Python in the menu environment
import obb from openbb
run obb.equity.price.historical()

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[2], line 1
----> 1 obb.equity.price.historical(
      2     symbol="AAPL",
      3     start_date="2020-01-01",
      4     end_date="2020-12-31",
      5     interval="1d",
      6 )

File ~/github/humblFINANCE-org/humblDATA/.venv/lib/python3.12/site-packages/openbb/package/__extensions__.py:127, in Extensions.equity(self)
    124 @property
    125 def equity(self):
    126     # pylint: disable=import-outside-toplevel
--> 127     from . import equity
    129     return equity.ROUTER_equity(command_runner=self._command_runner)

File ~/github/humblFINANCE-org/humblDATA/.venv/lib/python3.12/site-packages/openbb/package/equity.py:7
      5 from datetime import date
      6 from inspect import Parameter
----> 7 from typing import (
      8     TYPE_CHECKING,
      9     Annotated,
     10     Any,
     11     EquityInfo,
     12     EquityScreener,
     13     EquitySearch,
     14     ForwardRef,
     15     HistoricalMarketCap,
     16     Literal,
     17     MarketSnapshots,
     18     Optional,
     19     Union,
     20 )
     21 from warnings import simplefilter, warn
     23 import numpy

ImportError: cannot import name 'EquityInfo' from 'typing' (/Users/jjfantini/github/humblFINANCE-org/humblDATA/menv/lib/python3.12/typing.py)

Screenshots

Image

Desktop (please complete the following information):

  • Mac Sequoia
  • OpenBB 4.4.4
  • Python 3.12.10

I have this logic working on another project, what could the issue be?

@deeleeramone
Copy link
Contributor

deeleeramone commented May 9, 2025

If it's anything like this, there will definitely be problems. uv add openbb gives you an ancient version instead of the latest.

Image

@deeleeramone
Copy link
Contributor

Despite that weird package version, everything else was fine.

Image

@jjfantini
Copy link
Author

I am on the latest openbb, and I am running into the same issue when using poetry as well.

@jjfantini
Copy link
Author

jjfantini commented May 12, 2025

I created a new virtual environment with micromamba on Python 3.12.10. I installed poetry and installed a new project with poetry install --no-cache

openbb: 4.4.4
openbb-yfinance: 1.4.4

Reproduce:

mm create --prefix ./menv python=3.12.10 --no-rc --repodata-ttl 0 --retry-clean-cache
mm activate --prefix ./menv
poetry install --no-cache
from openbb import obb
obb.equity.price.historical("AAPL", start_date="2022-01-01", end_date="2022-01-31")

I am also getting this error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[1], line 3
      1 from openbb import obb
----> 3 obb.equity.price.historical("AAPL", start_date="2022-01-01", end_date="2022-01-31")

File ~/github/humblFINANCE-org/humblAPI/menv/lib/python3.12/site-packages/openbb/package/__extensions__.py:118, in Extensions.equity(self)
    115 @property
    116 def equity(self):
    117     # pylint: disable=import-outside-toplevel
--> 118     from . import equity
    120     return equity.ROUTER_equity(command_runner=self._command_runner)

File ~/github/humblFINANCE-org/humblAPI/menv/lib/python3.12/site-packages/openbb/package/equity.py:34
     31 import typing
     33 from openbb_core.app.model.command_context import CommandContext
---> 34 from openbb_core.app.provider_interface import (
     35     OBBject_EquityInfo,
     36     OBBject_EquityScreener,
     37     OBBject_EquitySearch,
     38     OBBject_HistoricalMarketCap,
     39     OBBject_MarketSnapshots,
     40 )
     42 from typing import (
     43     EquityInfo,
     44     EquityScreener,
   (...)     47     MarketSnapshots,
     48 )
     50 class ROUTER_equity(Container):

ImportError: cannot import name 'OBBject_EquityInfo' from 'openbb_core.app.provider_interface' (/Users/jjfantini/github/humblFINANCE-org/humblAPI/menv/lib/python3.12/site-packages/openbb_core/app/provider_interface.py)

@jjfantini
Copy link
Author

Similar to #7114

@deeleeramone
Copy link
Contributor

``

I created a new virtual environment with micromamba on Python 3.12.10. I installed poetry and installed a new project with poetry install --no-cache

openbb: 4.4.4 openbb-yfinance: 1.4.4

Reproduce:

mm create --prefix ./menv python=3.12.10 --no-rc --repodata-ttl 0 --retry-clean-cache
mm activate --prefix ./menv
poetry install --no-cache
from openbb import obb

Something is not right with this process. What are you creating the environment from? Micromamba doesn't ship Python, so where is it coming from? What are you installing with poetry install?

What does mm list show?

@jjfantini
Copy link
Author

 mm list
List of packages in environment: "/Users/jjfantini/github/humblFINANCE-org/humblAPI/menv"

  Name                         Version      Build                 Channel    
───────────────────────────────────────────────────────────────────────────────
  anyio                        4.9.0        pyh29332c3_0          conda-forge
  backports                    1.0          pyhd8ed1ab_5          conda-forge
  backports.tarfile            1.2.0        pyhd8ed1ab_1          conda-forge
  brotli-python                1.1.0        py312hde4cb15_2       conda-forge
  bzip2                        1.0.8        h99b78c6_7            conda-forge
  ca-certificates              2025.4.26    hbd8a1cb_0            conda-forge
  cachecontrol                 0.14.3       pyha770c72_0          conda-forge
  cachecontrol-with-filecache  0.14.3       pyhd8ed1ab_0          conda-forge
  certifi                      2025.4.26    pyhd8ed1ab_0          conda-forge
  cffi                         1.17.1       py312h0fad829_0       conda-forge
  charset-normalizer           3.4.2        pyhd8ed1ab_0          conda-forge
  cleo                         2.1.0        pyhd8ed1ab_1          conda-forge
  colorama                     0.4.6        pyhd8ed1ab_1          conda-forge
  crashtest                    0.4.1        pyhd8ed1ab_1          conda-forge
  distlib                      0.3.9        pyhd8ed1ab_1          conda-forge
  dulwich                      0.22.8       py312hcd83bfe_0       conda-forge
  exceptiongroup               1.3.0        pyhd8ed1ab_0          conda-forge
  filelock                     3.18.0       pyhd8ed1ab_0          conda-forge
  findpython                   0.6.3        pyhff2d567_0          conda-forge
  h11                          0.16.0       pyhd8ed1ab_0          conda-forge
  h2                           4.2.0        pyhd8ed1ab_0          conda-forge
  hpack                        4.1.0        pyhd8ed1ab_0          conda-forge
  httpcore                     1.0.9        pyh29332c3_0          conda-forge
  httpx                        0.28.1       pyhd8ed1ab_0          conda-forge
  hyperframe                   6.1.0        pyhd8ed1ab_0          conda-forge
  idna                         3.10         pyhd8ed1ab_1          conda-forge
  importlib-metadata           8.6.1        pyha770c72_0          conda-forge
  importlib_resources          6.5.2        pyhd8ed1ab_0          conda-forge
  jaraco.classes               3.4.0        pyhd8ed1ab_2          conda-forge
  jaraco.context               6.0.1        pyhd8ed1ab_0          conda-forge
  jaraco.functools             4.1.0        pyhd8ed1ab_0          conda-forge
  keyring                      25.6.0       pyh534df25_0          conda-forge
  libblas                      3.9.0        31_h10e41b3_openblas  conda-forge
  libcblas                     3.9.0        31_hb3479ef_openblas  conda-forge
  libcxx                       20.1.4       ha82da77_1            conda-forge
  libexpat                     2.7.0        h286801f_0            conda-forge
  libffi                       3.4.6        h1da3d7d_1            conda-forge
  libgfortran                  14.2.0       heb5dd2a_105          conda-forge
  libgfortran5                 14.2.0       h2c44a93_105          conda-forge
  liblapack                    3.9.0        31_hc9a63f6_openblas  conda-forge
  liblzma                      5.8.1        h39f12f2_1            conda-forge
  libopenblas                  0.3.29       openmp_hf332438_0     conda-forge
  libsqlite                    3.49.2       h3f77e49_0            conda-forge
  libzlib                      1.3.1        h8359307_2            conda-forge
  llvm-openmp                  20.1.4       hdb05f8b_0            conda-forge
  more-itertools               10.7.0       pyhd8ed1ab_0          conda-forge
  msgpack-python               1.1.0        py312h6142ec9_0       conda-forge
  ncurses                      6.5          h5e97a16_3            conda-forge
  numpy                        2.2.5        py312h7c1f314_0       conda-forge
  openssl                      3.5.0        h81ee809_1            conda-forge
  packaging                    25.0         pyh29332c3_1          conda-forge
  pbs-installer                2025.4.9     pyhd8ed1ab_0          conda-forge
  pip                          25.1.1       pyh8b19718_0          conda-forge
  pkginfo                      1.12.1.2     pyhd8ed1ab_0          conda-forge
  platformdirs                 4.3.8        pyhe01879c_0          conda-forge
  poetry                       2.1.3        pyh534df25_0          conda-forge
  poetry-core                  2.1.3        pyhd8ed1ab_0          conda-forge
  pycparser                    2.22         pyh29332c3_1          conda-forge
  pyproject_hooks              1.2.0        pyhd8ed1ab_1          conda-forge
  pysocks                      1.7.1        pyha55dd90_7          conda-forge
  python                       3.12.8       hc22306f_1_cpython    conda-forge
  python-build                 1.2.2.post1  pyhff2d567_1          conda-forge
  python-fastjsonschema        2.21.1       pyhd8ed1ab_0          conda-forge
  python-installer             0.7.0        pyhff2d567_1          conda-forge
  python_abi                   3.12         7_cp312               conda-forge
  rapidfuzz                    3.13.0       py312hd8f9ff3_0       conda-forge
  readline                     8.2          h1d1bf99_2            conda-forge
  requests                     2.32.3       pyhd8ed1ab_1          conda-forge
  requests-toolbelt            1.0.0        pyhd8ed1ab_1          conda-forge
  setuptools                   80.1.0       pyhff2d567_0          conda-forge
  shellingham                  1.5.4        pyhd8ed1ab_1          conda-forge
  sniffio                      1.3.1        pyhd8ed1ab_1          conda-forge
  tk                           8.6.13       h5083fa2_1            conda-forge
  tomli                        2.2.1        pyhd8ed1ab_1          conda-forge
  tomlkit                      0.13.2       pyha770c72_1          conda-forge
  trove-classifiers            2025.5.9.12  pyhd8ed1ab_0          conda-forge
  typing_extensions            4.13.2       pyh29332c3_0          conda-forge
  tzdata                       2025b        h78e105d_0            conda-forge
  urllib3                      2.4.0        pyhd8ed1ab_0          conda-forge
  virtualenv                   20.31.2      pyhd8ed1ab_0          conda-forge
  wheel                        0.45.1       pyhd8ed1ab_1          conda-forge
  xattr                        1.1.0        py312h024a12e_1       conda-forge
  zipp                         3.21.0       pyhd8ed1ab_1          conda-forge
  zstandard                    0.23.0       py312hea69d52_2       conda-forge

@jjfantini
Copy link
Author

I am installing the project from the poetry.lock file which I have regenerated fresh a few times

@deeleeramone
Copy link
Contributor

deeleeramone commented May 12, 2025

I am installing the project from the poetry.lock file which I have regenerated fresh a few times

According to your environment package list, you don't have any openbb packages installed at all. So your import is coming from somewhere else, i.e, some broken global thing. poetry install will do unexpected things if poetry is not configured to use the current env instead of its own environment that gets created somewhere buried in the machine.

@jjfantini
Copy link
Author

This is poetry show:

 poetry show
aiohappyeyeballs          2.6.1          Happy Eyeballs for asyncio
aiohttp                   3.11.18        Async http client/server fr...
aiohttp-client-cache      0.11.1         Persistent cache for aiohtt...
aiosignal                 1.3.2          aiosignal: a list of regist...
aiosqlite                 0.20.0         asyncio bridge to the stand...
annotated-types           0.7.0          Reusable constraint types t...
anyio                     4.9.0          High level compatibility la...
appnope                   0.1.4          Disable App Nap on macOS >=...
argcomplete               3.5.3          Bash tab completion for arg...
argon2-cffi               23.1.0         Argon2 for Python
argon2-cffi-bindings      21.2.0         Low-level CFFI bindings for...
arrow                     1.3.0          Better dates & times for Py...
asttokens                 3.0.0          Annotate AST trees with sou...
async-lru                 2.0.5          Simple LRU cache for asyncio
attrs                     23.2.0         Classes Without Boilerplate
authlib                   1.5.2          The ultimate Python library...
babel                     2.17.0         Internationalization utilities
backoff                   2.2.1          Function decoration for bac...
beautifulsoup4            4.13.4         Screen-scraping library
binaryornot               0.4.4          Ultra-lightweight pure Pyth...
bleach                    6.2.0          An easy safelist-based HTML...
build                     1.2.2.post1    A simple, correct Python bu...
cachecontrol              0.14.3         httplib2 caching for requests
cattrs                    24.1.3         Composable complex class su...
certifi                   2025.4.26      Python package for providin...
cffi                      1.17.1         Foreign Function Interface ...
cfgv                      3.4.0          Validate configuration and ...
chardet                   5.2.0          Universal encoding detector...
charset-normalizer        3.4.2          The Real First Universal Ch...
cleo                      2.1.0          Cleo allows you to create b...
click                     8.2.0          Composable command line int...
colorama                  0.4.6          Cross-platform colored term...
coloredlogs               15.0.1         Colored terminal output for...
comm                      0.2.2          Jupyter Python Comm impleme...
commitizen                3.31.0         Python commitizen client tool
cookiecutter              2.6.0          A command-line utility that...
courlan                   1.3.2          Clean, filter and sample UR...
coverage                  7.8.0          Code coverage measurement f...
crashtest                 0.4.1          Manage Python errors with ease
cruft                     2.16.0         Allows you to maintain all ...
cryptography              44.0.3         cryptography is a package w...
curl-adapter              1.0.0.post3    A curl HTTP adapter switch ...
curl-cffi                 0.10.0         libcurl ffi bindings for Py...
cz-conventional-gitmoji   0.2.4          A commitizen plugin that co...
dateparser                1.2.1          Date parsing library design...
debugpy                   1.8.14         An implementation of the De...
decli                     0.6.2          Minimal, easy-to-use, decla...
decorator                 5.2.1          Decorators for Humans
deepdiff                  8.5.0          Deep Difference and Search ...
defusedxml                0.8.0rc2       XML bomb protection for Pyt...
distlib                   0.3.9          Distribution utilities
distro                    1.9.0          Distro - an OS platform inf...
dnspython                 2.7.0          DNS toolkit
dparse                    0.6.4          A parser for Python depende...
dulwich                   0.22.8         Python Git Library
email-validator           2.2.0          A robust email address synt...
et-xmlfile                2.0.0          An implementation of lxml.x...
execnet                   2.1.1          execnet: rapid multi-Python...
executing                 2.2.0          Get the currently executing...
fastapi                   0.115.12       FastAPI framework, high per...
fastapi-cache2            0.2.2          Cache for FastAPI
fastapi-cli               0.0.7          Run and manage FastAPI apps...
fastapi-limiter           0.1.6          A request rate limiter for ...
fastjsonschema            2.21.1         Fastest Python implementati...
filelock                  3.12.4         A platform independent file...
findpython                0.6.3          A utility to find python ve...
fqdn                      1.5.1          Validates fully-qualified d...
frozendict                2.4.6          A simple immutable dictionary
frozenlist                1.6.0          A list-like structure which...
gitdb                     4.0.12         Git Object Database
gitpython                 3.1.44         GitPython is a Python libra...
h11                       0.16.0         A pure-Python, bring-your-o...
html5lib                  1.1            HTML parser based on the WH...
htmldate                  1.9.3          Fast and robust extraction ...
httpcore                  1.0.9          A minimal low-level HTTP cl...
httptools                 0.6.4          A collection of framework i...
httpx                     0.28.1         The next generation HTTP cl...
humanfriendly             10.0           Human friendly output for t...
humbldata                 1.20.18        open-sourcing the math behi...
identify                  2.6.10         File identification library...
idna                      3.10           Internationalized Domain Na...
importlib-metadata        8.7.0          Read metadata from Python p...
iniconfig                 2.1.0          brain-dead simple config-in...
inscriptis                2.6.0          inscriptis - HTML to text c...
installer                 0.7.0          A library for installing Py...
ipykernel                 6.29.5         IPython Kernel for Jupyter
ipython                   9.2.0          IPython: Productive Interac...
ipython-pygments-lexers   1.1.1          Defines a variety of Pygmen...
isoduration               20.11.0        Operations with ISO 8601 du...
itsdangerous              2.2.0          Safely pass data to untrust...
jaraco-classes            3.4.0          Utility functions for Pytho...
jaraco-context            6.0.1          Useful decorators and conte...
jaraco-functools          4.1.0          Functools like those found ...
jedi                      0.19.2         An autocompletion tool for ...
jinja2                    3.1.6          A very fast and expressive ...
json5                     0.12.0         A Python implementation of ...
jsonpointer               3.0.0          Identify specific nodes in ...
jsonschema                4.23.0         An implementation of JSON S...
jsonschema-specifications 2025.4.1       The JSON Schema meta-schema...
jupyter-client            8.6.3          Jupyter protocol implementa...
jupyter-core              5.7.2          Jupyter core package. A bas...
jupyter-events            0.12.0         Jupyter Event System library
jupyter-lsp               2.2.5          Multi-Language Server WebSo...
jupyter-server            2.16.0         The backend—i.e. core servi...
jupyter-server-terminals  0.5.3          A Jupyter Server Extension ...
jupyterlab                4.4.2          JupyterLab computational en...
jupyterlab-pygments       0.3.0          Pygments theme using Jupyte...
jupyterlab-server         2.27.3         A set of server components ...
justext                   3.0.2          Heuristic based boilerplate...
keyring                   25.6.0         Store and access your passw...
lxml                      5.4.0          Powerful and Pythonic XML p...
lxml-html-clean           0.4.2          HTML cleaner from lxml project
markdown-it-py            3.0.0          Python port of markdown-it....
markupsafe                3.0.2          Safely add untrusted string...
marshmallow               4.0.0          A lightweight library for c...
matplotlib-inline         0.1.7          Inline Matplotlib backend f...
mdurl                     0.1.2          Markdown URL utilities
mistune                   3.1.3          A sane and fast Markdown pa...
monotonic                 1.6            An implementation of time.m...
more-itertools            10.7.0         More routines for operating...
msgpack                   1.1.0          MessagePack serializer
multidict                 6.4.3          multidict implementation
multitasking              0.0.11         Non-blocking Python methods...
mypy                      1.15.0         Optional static typing for ...
mypy-extensions           1.1.0          Type system extensions for ...
narwhals                  1.39.0         Extremely lightweight compa...
nbclient                  0.10.2         A client library for execut...
nbconvert                 7.16.6         Converting Jupyter Notebook...
nbformat                  5.10.4         The Jupyter Notebook format
nest-asyncio              1.6.0          Patch asyncio to allow nest...
nodeenv                   1.9.1          Node.js virtual environment...
notebook-shim             0.2.4          A shim layer for notebook t...
numpy                     2.2.5          Fundamental package for arr...
openbb                    4.4.4          Investment research for eve...
openbb-benzinga           1.4.1          Benzinga extension for OpenBB
openbb-bls                1.1.2          The Bureau of Labor Statist...
openbb-cftc               1.1.1          The mission of the Commodit...
openbb-commodity          1.3.1          Commodity extension for OpenBB
openbb-core               1.4.7          OpenBB package with core fu...
openbb-crypto             1.4.1          Crypto extension for OpenBB
openbb-currency           1.4.1          Currency extension for OpenBB
openbb-derivatives        1.4.1          Derivatives extension for O...
openbb-econdb             1.3.1          EconDB extension for OpenBB
openbb-economy            1.4.2          Economy extension for OpenBB
openbb-equity             1.4.1          Equity extension for OpenBB
openbb-etf                1.4.1          ETF extension for OpenBB
openbb-federal-reserve    1.4.2          US Federal Reserve Data Ext...
openbb-fixedincome        1.4.3          Fixed income extension for ...
openbb-fmp                1.4.2          FMP extension for OpenBB
openbb-fred               1.4.4          FRED extension for OpenBB
openbb-imf                1.1.1          https://datahelp.imf.org/kn...
openbb-index              1.4.1          Index extension for OpenBB
openbb-intrinio           1.4.1          Intrinio extension for OpenBB
openbb-news               1.4.1          News extension for OpenBB
openbb-oecd               1.4.1          OECD extension for OpenBB
openbb-platform-api       1.1.8          OpenBB Platform API: Launch...
openbb-polygon            1.4.1          Polygon extension for OpenBB
openbb-regulators         1.4.2          Markets and Agency Regulato...
openbb-sec                1.4.3          SEC extension for OpenBB
openbb-tiingo             1.4.1          Tiingo extension for OpenBB
openbb-tradingeconomics   1.4.1          Trading Economics extension...
openbb-us-eia             1.1.1          The U.S. Energy Information...
openbb-yfinance           1.4.6          yfinance extension for OpenBB
openpyxl                  3.1.5          A Python library to read/wr...
orderly-set               5.4.1          Orderly set
orjson                    3.10.18        Fast, correct Python JSON l...
overrides                 7.7.0          A decorator to automaticall...
packaging                 25.0           Core utilities for Python p...
pandas                    2.2.3          Powerful data structures fo...
pandera                   0.24.0rc0      A light-weight and flexible...
pandocfilters             1.5.1          Utilities for writing pando...
parso                     0.8.4          A Python Parser
pastel                    0.2.1          Bring colors to your terminal.
pbs-installer             2025.4.9       Installer for Python Build ...
pdoc                      15.0.3         API Documentation for Pytho...
peewee                    3.18.1         a little orm
pendulum                  3.1.0          Python datetimes made easy
pexpect                   4.9.0          Pexpect allows easy control...
pkginfo                   1.12.1.2       Query metadata from sdists ...
platformdirs              4.3.8          A small Python package for ...
plotly                    6.1.0rc0       An open-source interactive ...
pluggy                    1.5.0          plugin and hook calling mec...
poethepoet                0.34.0         A task runner that works we...
poetry                    2.1.3          Python dependency managemen...
poetry-core               2.1.3          Poetry PEP 517 Build Backend
polars                    1.29.0         Blazingly fast DataFrame li...
posthog                   3.25.0         Integrate PostHog into any ...
pprintpp                  0.4.0          A drop-in replacement for p...
pre-commit                4.2.0          A framework for managing an...
prometheus-client         0.21.1         Python client for the Prome...
prompt-toolkit            3.0.51         Library for building powerf...
propcache                 0.3.1          Accelerated property cache
psutil                    6.0.0          Cross-platform lib for proc...
ptyprocess                0.7.0          Run a subprocess in a pseud...
pure-eval                 0.2.3          Safely evaluate AST nodes w...
pyarrow                   20.0.0         Python library for Apache A...
pycparser                 2.22           C parser in Python
pycurl                    7.45.3         PycURL -- A Python Interfac...
pydantic                  2.11.4         Data validation using Pytho...
pydantic-core             2.33.2         Core functionality for Pyda...
pydantic-extra-types      2.10.4         Extra Pydantic types.
pydantic-settings         2.9.1          Settings management using P...
pygments                  2.19.1         Pygments is a syntax highli...
pyjwt                     2.10.1         JSON Web Token implementati...
pyproject-hooks           1.2.0          Wrappers to call pyproject....
pytest                    8.3.5          pytest: simple powerful tes...
pytest-asyncio            0.23.8         Pytest support for asyncio
pytest-clarity            1.0.1          A plugin providing an alter...
pytest-mock               3.14.0         Thin-wrapper around the moc...
pytest-xdist              3.6.1          pytest xdist plugin for dis...
python-dateutil           2.9.0.post0    Extensions to the standard ...
python-dotenv             1.1.0          Read key-value pairs from a...
python-json-logger        3.3.0          JSON Log Formatter for the ...
python-multipart          0.0.20         A streaming multipart parse...
python-redis-cache        4.0.2          Basic Redis caching for fun...
python-slugify            8.0.4          A Python slugify applicatio...
pytz                      2025.2         World timezone definitions,...
pyyaml                    6.0.2          YAML parser and emitter for...
pyzmq                     26.4.0         Python bindings for 0MQ
questionary               2.1.0          Python library to build pre...
rapidfuzz                 3.13.0         rapid fuzzy string matching
redis                     5.2.1          Python client for Redis dat...
referencing               0.36.2         JSON Referencing + Python
regex                     2024.11.6      Alternative regular express...
requests                  2.32.3         Python HTTP for Humans.
requests-cache            1.2.1          A persistent cache for pyth...
requests-toolbelt         1.0.0          A utility belt for advanced...
rfc3339-validator         0.1.4          A pure python RFC3339 valid...
rfc3986-validator         0.1.1          Pure python rfc3986 validator
rich                      14.0.0         Render rich text, tables, p...
rich-toolkit              0.14.6         Rich toolkit for building c...
rpds-py                   0.24.0         Python bindings to Rust's p...
ruamel-yaml               0.18.10        ruamel.yaml is a YAML parse...
ruamel-yaml-clib          0.2.12         C version of reader, parser...
ruff                      0.7.4          An extremely fast Python li...
safety                    3.2.9          Checks installed dependenci...
safety-schemas            0.0.5          Schemas for Safety tools
send2trash                1.8.3          Send file to trash natively...
setuptools                80.4.0         Easily download, build, ins...
shellcheck-py             0.10.0.1       Python wrapper around invok...
shellingham               1.5.4          Tool to Detect Surrounding ...
six                       1.17.0         Python 2 and 3 compatibilit...
smmap                     5.0.2          A pure Python implementatio...
sniffio                   1.3.1          Sniff out which async libra...
soupsieve                 2.7            A modern CSS selector imple...
stack-data                0.6.3          Extract data from python st...
starlette                 0.46.2         The little ASGI library tha...
termcolor                 2.5.0          ANSI color formatting for o...
terminado                 0.18.1         Tornado websocket backend f...
text-unidecode            1.3            The most basic Text::Unidec...
tinycss2                  1.4.0          A tiny CSS parser
tld                       0.13           Extract the top-level domai...
tomlkit                   0.13.2         Style preserving TOML library
tornado                   6.4.2          Tornado is a Python web fra...
trafilatura               2.0.0          Python & Command-line tool ...
traitlets                 5.14.3         Traitlets Python configurat...
trove-classifiers         2025.5.9.12    Canonical source for classi...
typeguard                 4.4.2          Run-time type checker for P...
typer                     0.15.3         Typer, build great CLIs. Ea...
types-python-dateutil     2.9.0.20241206 Typing stubs for python-dat...
typing-extensions         4.13.2         Backported and Experimental...
typing-inspect            0.9.0          Runtime inspection utilitie...
typing-inspection         0.4.0          Runtime typing introspectio...
tzdata                    2025.2         Provider of IANA time zone ...
tzlocal                   5.3.1          tzinfo object for the local...
ujson                     5.10.0         Ultra fast JSON encoder and...
uri-template              1.3.0          RFC 6570 URI Template Proce...
url-normalize             1.4.3          URL normalization for Python
urllib3                   2.4.0          HTTP library with thread-sa...
uuid7                     0.1.0          UUID version 7, generating ...
uvicorn                   0.34.2         The lightning-fast ASGI ser...
uvloop                    0.21.0         Fast implementation of asyn...
virtualenv                20.31.2        Virtual Python Environment ...
watchfiles                1.0.5          Simple, modern and high per...
wcwidth                   0.2.13         Measures the displayed widt...
webcolors                 24.11.1        A library for working with ...
webencodings              0.5.1          Character encoding aliases ...
websocket-client          1.8.0          WebSocket client for Python...
websockets                15.0.1         An implementation of the We...
xattr                     1.1.4          Python wrapper for extended...
xlrd                      2.0.1          Library for developers to e...
xmltodict                 0.13.0         Makes working with XML feel...
yarl                      1.20.0         Yet another URL library
yfinance                  0.2.58         Download market data from Y...

@jjfantini
Copy link
Author

jjfantini commented May 12, 2025

I am installing the project from the poetry.lock file which I have regenerated fresh a few times

According to your environment package list, you don't have any openbb packages installed at all. So your import is coming from somewhere else, i.e, some broken global thing. poetry install will do unexpected things if poetry is not configured to use the current env instead of its own environment that gets created somewhere buried in the machine.

  1. openbb is present as a package
  2. Python Interpreter is using the micromamba environment:
 poetry env info

Virtualenv
Python:         3.12.8
Implementation: CPython
Path:           /Users/jjfantini/github/humblFINANCE-org/humblAPI/menv
Executable:     /Users/jjfantini/github/humblFINANCE-org/humblAPI/menv/bin/python
Valid:          True

Base
Platform:   darwin
OS:         posix
Python:     3.12.8
Path:       /Users/jjfantini/github/humblFINANCE-org/humblAPI/menv
Executable: /Users/jjfantini/github/humblFINANCE-org/humblAPI/menv/bin/python3.12

@jjfantini
Copy link
Author

I have tried using uv as well, but running into the same error.

@deeleeramone
Copy link
Contributor

This is all very confusing. In your initial post, you said the steps to recreate were to use a Conda Python environment, with UV installed, to create a new environment and add openbb to that.

Can we isolate only for the initial reported conditions? Remove poetry out of the equation entirely. Substitute the conda references with mm or mamba equivalents. Follow along here, the you should see the assets being built as the first thing happening on import.

Clean Conda/Mamba cache

conda clean --all -y

Create Python environment for 3.12 with Conda/Mamba

conda create -n test python=3.12 -y

Activate Conda environment

conda activate test

Install UV

pip install uv

Clean UV cache

uv cache clean

Create new environment with UV

uv venv new

Activate new UV environment

source new/bin/activate

Use UV to install openbb into environment.

uv pip install "openbb[all]" --prerelease=allow

Deactivate Conda environment.

conda deactivate

Start Python and import OpenBB

python

This should be the first thing you see.

>>> from openbb import obb
Extensions to add: alpha_vantage@1.4.1, biztoc@1.4.2, cboe@1.4.1, deribit@1.0.1, ecb@1.4.2, econometrics@1.5.3, finra@1.4.1, finviz@1.3.1, government_us@1.4.1, multpl@1.1.1, nasdaq@1.4.1, openbb_charting@2.3.4, quantitative@1.4.3, seeking_alpha@1.4.1, stockgrid@1.4.1, technical@1.4.3, tmx@1.3.2, tradier@1.3.1, wsj@1.4.1, yfinance@1.4.6
Extensions to remove: yfinance@1.4.3

Building...
>>> 

The first command will take a bit longer to run because the pycache will be getting created.

>>> obb.equity.price.historical("AAPL", provider="yfinance")
OBBject

id: 068226d4-c800-72c0-8000-11130c0664a5
results: [{'date': datetime.date(2024, 5, 13), 'open': 185.44000244140625, 'high': ...
provider: yfinance
warnings: None
chart: {'content': {'data': [{'close': [185.86000061035156, 187.38249588012695, 188...
extra: {'metadata': {'arguments': {'provider_choices': {'provider': 'yfinance'}, 's...
>>> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants