ValueError("cannot reindex from a duplicate axis") -- Only getting this error in Streamlit Cloud

I am receiving a ValueError when utilizing a function that manipulates a DataFrame. The code works fine locally, so I am wondering if this issue has to do with anything specific to Streamlit Cloud? I am utilizing st.cache for optimization and this seems to be working great locally. Could this have anything to do with Session States (not currently utilizing these)?

Repo is located here.
App is located here.

Error Log:

File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/", line 354, in _run_script
    exec(code, module.__dict__)
File "/app/axe_cap_terminal/", line 1076, in <module>
File "/home/appuser/venv/lib/python3.7/site-packages/pandas_ta/", line 778, in strategy
    getattr(self, ind["kind"])(*params, **{**ind, **kwargs})
File "/home/appuser/venv/lib/python3.7/site-packages/pandas_ta/", line 1010, in macd
    result = macd(close=close, fast=fast, slow=slow, signal=signal, offset=offset, **kwargs)
File "/home/appuser/venv/lib/python3.7/site-packages/pandas_ta/momentum/", line 58, in macd
    df = DataFrame(data)
File "/home/appuser/venv/lib/python3.7/site-packages/pandas/core/", line 614, in __init__
    mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager)
File "/home/appuser/venv/lib/python3.7/site-packages/pandas/core/internals/", line 463, in dict_to_mgr
    arrays, data_names, index, columns, dtype=dtype, typ=typ, consolidate=copy
File "/home/appuser/venv/lib/python3.7/site-packages/pandas/core/internals/", line 122, in arrays_to_mgr
    arrays = _homogenize(arrays, index, dtype)
File "/home/appuser/venv/lib/python3.7/site-packages/pandas/core/internals/", line 568, in _homogenize
    val = val.reindex(index, copy=False)
File "/home/appuser/venv/lib/python3.7/site-packages/pandas/core/", line 4579, in reindex
    return super().reindex(index=index, **kwargs)
File "/home/appuser/venv/lib/python3.7/site-packages/pandas/core/", line 4810, in reindex
    axes, level, limit, tolerance, method, fill_value, copy
File "/home/appuser/venv/lib/python3.7/site-packages/pandas/core/", line 4834, in _reindex_axes
File "/home/appuser/venv/lib/python3.7/site-packages/pandas/core/", line 4880, in _reindex_with_indexers
File "/home/appuser/venv/lib/python3.7/site-packages/pandas/core/internals/", line 663, in reindex_indexer
File "/home/appuser/venv/lib/python3.7/site-packages/pandas/core/indexes/", line 3785, in _validate_can_reindex
    raise ValueError("cannot reindex from a duplicate axis")

Thank you for reading, any help is appreciated.

After further testing. It seems like certain stock tickers throw this error, while others do not. For example, these tickers throw this error:

  • NVDA
  • HD

While these tickers do not:

  • AMZN
  • GOOG

Locally, every valid ticker works:

Error on Streamlit Cloud: