Skip to content

Quotes.get_timeseries_plot monday bug #24

@thammo4

Description

@thammo4

Normally, calling Quotes.get_timeseries_plot without a start or end date will return the week's performance. However, if you call it on a monday, it returns an error because there is no data for the week.

quotes.get_timeseries_plot('FIBK')
Traceback (most recent call last):
File "", line 1, in
File "/Users/thammons/Desktop/msds/tradier/uvatradier/uvatradier/quotes.py", line 262, in get_timeseries_plot
bar_data = self.get_historical_quotes(symbol, interval, start_date, end_date);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/thammons/Desktop/msds/tradier/uvatradier/uvatradier/quotes.py", line 130, in get_historical_quotes
return pd.DataFrame(data['history']['day']);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/pandas/core/frame.py", line 767, in init
)

File "/opt/homebrew/lib/python3.12/site-packages/pandas/core/internals/construction.py", line 503, in dict_to_mgr
return arrays_to_mgr(arrays, columns, index, dtype=dtype, typ=typ, consolidate=copy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/pandas/core/internals/construction.py", line 114, in arrays_to_mgr
index = _extract_index(arrays)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/pandas/core/internals/construction.py", line 667, in _extract_index
raise ValueError("If using all scalar values, you must pass an index")
ValueError: If using all scalar values, you must pass an index

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions