Skip to content
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

[Bug]: Updates to OpenBB APIs to be investigated #9045

Closed
martyna-mindsdb opened this issue Apr 9, 2024 · 9 comments · May be fixed by #9688
Closed

[Bug]: Updates to OpenBB APIs to be investigated #9045

martyna-mindsdb opened this issue Apr 9, 2024 · 9 comments · May be fixed by #9688
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@martyna-mindsdb
Copy link
Contributor

martyna-mindsdb commented Apr 9, 2024

Short description of current behavior

Investigate updates to OpenBB APIs and update the handler's code and Readme.

Current status:

  • can connect OpenBB to MindsDB
  • can list available tables
  • cannot query tables due to token being required

image

@martyna-mindsdb martyna-mindsdb added the bug Something isn't working label Apr 9, 2024
@ZoranPandovski ZoranPandovski added the help wanted Extra attention is needed label Apr 9, 2024
@parthiv11
Copy link
Contributor

I would like to work on this

@martyna-mindsdb
Copy link
Contributor Author

@parthiv11
Are you still working on this issue?

@parthiv11
Copy link
Contributor

i am trying to find casue..

pip show openbb
Name: openbb
Version: 4.2.2
Summary: Investment research for everyone, anywhere.
Home-page: 
Author: OpenBB Team
Author-email: [email protected]
License: AGPL-3.0-only
Location: /home/vscode/.local/lib/python3.9/site-packages
Requires: openbb-benzinga, openbb-commodity, openbb-core, openbb-crypto, openbb-currency, openbb-derivatives, openbb-econdb, openbb-economy, openbb-equity, openbb-etf, openbb-federal-reserve, openbb-fixedincome, openbb-fmp, openbb-fred, openbb-index, openbb-intrinio, openbb-news, openbb-oecd, openbb-polygon, openbb-regulators, openbb-sec, openbb-tiingo, openbb-tradingeconomics, openbb-yfinance
Required-by: 

Python 3.9.19 (main, May 14 2024, 09:00:30) 
[GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from openbb_core.app.static.app_factory import create_app
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/static/app_factory.py", line 5, in <module>
    from openbb_core.app.command_runner import CommandRunner
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/command_runner.py", line 16, in <module>
    from openbb_core.app.logs.logging_service import LoggingService
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/logs/logging_service.py", line 9, in <module>
    from openbb_core.app.logs.formatters.formatter_with_exceptions import (
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/logs/formatters/formatter_with_exceptions.py", line 8, in <module>
    from openbb_core.app.logs.models.logging_settings import LoggingSettings
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/logs/models/logging_settings.py", line 8, in <module>
    from openbb_core.app.model.user_settings import UserSettings
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/model/user_settings.py", line 6, in <module>
    from openbb_core.app.model.credentials import Credentials
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/model/credentials.py", line 98, in <module>
    _Credentials = CredentialsLoader().load()
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/model/credentials.py", line 87, in load
    self.from_providers()
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/model/credentials.py", line 82, in from_providers
    self.credentials = ProviderInterface().credentials
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/model/abstract/singleton.py", line 17, in __call__
    instance = super().__call__(*args, **kwargs)
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/provider_interface.py", line 107, in __init__
    self._registry_map = registry_map or RegistryMap()
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/provider/registry_map.py", line 26, in __init__
    self._registry = registry or RegistryLoader.from_extensions()
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/provider/registry.py", line 44, in from_extensions
    for name, entry in ExtensionLoader().provider_objects.items():  # type: ignore[attr-defined]
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/model/abstract/singleton.py", line 17, in __call__
    instance = super().__call__(*args, **kwargs)
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/extension_loader.py", line 41, in __init__
    self._obbject_entry_points: EntryPoints = self._sorted_entry_points(
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/extension_loader.py", line 127, in _sorted_entry_points
    return sorted(entry_points(group=group))  # type: ignore
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 952, in entry_points
    return EntryPoints(eps).select(**params)
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 949, in <genexpr>
    eps = itertools.chain.from_iterable(
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/_itertools.py", line 16, in unique_everseen
    k = key(element)
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/_py39compat.py", line 18, in normalized_name
    return dist._normalized_name
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 874, in _normalized_name
    or super()._normalized_name
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 482, in _normalized_name
    return Prepared.normalize(self.name)
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 792, in normalize
    return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
  File "/usr/local/lib/python3.9/re.py", line 210, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object
>>> from openbb import openbb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb/__init__.py", line 8, in <module>
    from openbb_core.app.static.app_factory import (
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/static/app_factory.py", line 5, in <module>
    from openbb_core.app.command_runner import CommandRunner
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/command_runner.py", line 16, in <module>
    from openbb_core.app.logs.logging_service import LoggingService
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/logs/logging_service.py", line 9, in <module>
    from openbb_core.app.logs.formatters.formatter_with_exceptions import (
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/logs/formatters/formatter_with_exceptions.py", line 8, in <module>
    from openbb_core.app.logs.models.logging_settings import LoggingSettings
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/logs/models/logging_settings.py", line 8, in <module>
    from openbb_core.app.model.user_settings import UserSettings
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/model/user_settings.py", line 6, in <module>
    from openbb_core.app.model.credentials import Credentials
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/model/credentials.py", line 98, in <module>
    _Credentials = CredentialsLoader().load()
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/model/credentials.py", line 87, in load
    self.from_providers()
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/model/credentials.py", line 82, in from_providers
    self.credentials = ProviderInterface().credentials
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/model/abstract/singleton.py", line 17, in __call__
    instance = super().__call__(*args, **kwargs)
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/provider_interface.py", line 107, in __init__
    self._registry_map = registry_map or RegistryMap()
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/provider/registry_map.py", line 26, in __init__
    self._registry = registry or RegistryLoader.from_extensions()
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/provider/registry.py", line 44, in from_extensions
    for name, entry in ExtensionLoader().provider_objects.items():  # type: ignore[attr-defined]
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/model/abstract/singleton.py", line 17, in __call__
    instance = super().__call__(*args, **kwargs)
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/extension_loader.py", line 41, in __init__
    self._obbject_entry_points: EntryPoints = self._sorted_entry_points(
  File "/home/vscode/.local/lib/python3.9/site-packages/openbb_core/app/extension_loader.py", line 127, in _sorted_entry_points
    return sorted(entry_points(group=group))  # type: ignore
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 952, in entry_points
    return EntryPoints(eps).select(**params)
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 949, in <genexpr>
    eps = itertools.chain.from_iterable(
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/_itertools.py", line 16, in unique_everseen
    k = key(element)
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/_py39compat.py", line 18, in normalized_name
    return dist._normalized_name
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 874, in _normalized_name
    or super()._normalized_name
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 482, in _normalized_name
    return Prepared.normalize(self.name)
  File "/home/vscode/.local/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 792, in normalize
    return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
  File "/usr/local/lib/python3.9/re.py", line 210, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object

```

@parthiv11
Copy link
Contributor

constantly getting above error

@martyna-mindsdb
Copy link
Contributor Author

@parthiv11
The update required for this handler must be around the missing tiingo_token, as mentioned in the issue description.
I have just tested it by generating tiingo_token, including it in the openbb account, and regenerating the openbb pat. However, this error persists.

@ZoranPandovski Have you tried testing it?

@parthiv11
Copy link
Contributor

@martyna-mindsdb this works perfectly now, please verify from your side too.

@martyna-mindsdb
Copy link
Contributor Author

@parthiv11
There hasn't been any updates made to the openbb_handler for the past 5 months. It still doesn't seem to work as expected.

Can you share the example that worked for you please?

@parthiv11
Copy link
Contributor

obb.test.webm

@martyna-mindsdb

previously not working for me too, but at that time there were deprecated env var name used on openbb dashboard , now it fixes!!

try out your side and let me know

@martyna-mindsdb
Copy link
Contributor Author

@parthiv11
I noticed that OpenBB Hub lets you add other credentials now and I added relevant API keys there, but for some reason I get an error about missing API keys, although it is added to OpenBB Hub.

Screen.Recording.2024-09-02.at.14.00.28.mov

@parthiv11 parthiv11 mentioned this issue Sep 3, 2024
9 tasks
@linear linear bot closed this as completed Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Development

Successfully merging a pull request may close this issue.

3 participants