Value error on barset

ValueError: Passed string value “‘https://data.alpaca.markets’” is not an “http*://” or “ws*://” URL

I am getting this error when requesting price data with python. It was working fine 2 days ago.
api = tradeapi.REST(api_key, api_secret, base_url, api_version=‘v2’)
test = api.get_barset(‘AAPL’, ‘day’)

please someone help me out!!

How is your base_url variable defined? The 2 lines you posted work fine.

I had a conflicting environment variable that fed the incorrect base_url and data url. Thank you for oyur help