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

[Bugfix] Uncover cmd len warn #6536

Merged
merged 16 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cli/openbb_cli/config/menu_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def _format_cmd_name(self, name: str) -> str:
self.warnings.append(
{
"warning": "Command name too long",
"command": name,
"trimmed_command": new_name,
"actual command": f"`{name}`",
"displayed command": f"`{new_name}`",
}
)
name = new_name
Expand Down
4 changes: 1 addition & 3 deletions cli/openbb_cli/controllers/base_platform_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,7 @@ def print_help(self):

session.console.print(text=mt.menu_text, menu=self.PATH)

settings = session.settings
dev_mode = settings.DEBUG_MODE or settings.TEST_MODE
if mt.warnings and dev_mode:
if mt.warnings:
session.console.print("")
for w in mt.warnings:
w_str = str(w).replace("{", "").replace("}", "").replace("'", "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ def country_string(input_str: str):
url.replace(".M.RHPI.", ".Q.RHPI."), headers=headers
)
if response.status_code != 200:
raise Exception(f"Error with the OECD request: {response.status_code}")
raise OpenBBError(
f"Error with the OECD request (HTTP {response.status_code}): `{response.text}`"
)
df = read_csv(StringIO(response.text)).get(
["REF_AREA", "TIME_PERIOD", "OBS_VALUE"]
)
Expand Down
Loading