I am getting the same error for both the dma.py and buy_apple.py example files:
(base) C:\Users\tsfer>zipline run -f buyapple.py --start 2016-1-1 --end 2018-1-1 -o buyapple_out.pickle --no-benchmark
[2021-10-25 13:17:22.070951] INFO: zipline.finance.metrics.tracker: Simulated 503 trading days
first open: 2016-01-04 14:31:00+00:00
last close: 2017-12-29 21:00:00+00:00
Traceback (most recent call last):
File “C:\Users\tsfer\anaconda3\Scripts\zipline-script.py”, line 10, in
sys.exit(main())
File “C:\Users\tsfer\anaconda3\lib\site-packages\click\core.py”, line 764, in call
return self.main(*args, **kwargs)
File “C:\Users\tsfer\anaconda3\lib\site-packages\click\core.py”, line 717, in main
rv = self.invoke(ctx)
File “C:\Users\tsfer\anaconda3\lib\site-packages\click\core.py”, line 1137, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File “C:\Users\tsfer\anaconda3\lib\site-packages\click\core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “C:\Users\tsfer\anaconda3\lib\site-packages\click\core.py”, line 555, in invoke
return callback(*args, **kwargs)
File "C:\Users\tsfer\anaconda3\lib\site-packages\zipline_main.py", line 106, in _
return f(*args, **kwargs)
File “C:\Users\tsfer\anaconda3\lib\site-packages\click\decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “C:\Users\tsfer\anaconda3\lib\site-packages\zipline_main_.py”, line 322, in run
custom_loader=None,
File “C:\Users\tsfer\anaconda3\lib\site-packages\zipline\utils\run_algo.py”, line 221, in _run
“script”: algotext,
File “C:\Users\tsfer\anaconda3\lib\site-packages\zipline\algorithm.py”, line 641, in run
daily_stats = self._create_daily_stats(perfs)
File “C:\Users\tsfer\anaconda3\lib\site-packages\zipline\algorithm.py”, line 665, in _create_daily_stats
daily_dts = pd.DatetimeIndex([p[“period_close”] for p in daily_perfs], tz=“UTC”)
File “C:\Users\tsfer\anaconda3\lib\site-packages\pandas\core\indexes\datetimes.py”, line 253, in new
ambiguous=ambiguous,
File “C:\Users\tsfer\anaconda3\lib\site-packages\pandas\core\arrays\datetimes.py”, line 320, in _from_sequence
ambiguous=ambiguous,
File “C:\Users\tsfer\anaconda3\lib\site-packages\pandas\core\arrays\datetimes.py”, line 1755, in sequence_to_dt64ns
tz = maybe_infer_tz(tz, inferred_tz)
File “C:\Users\tsfer\anaconda3\lib\site-packages\pandas\core\arrays\datetimes.py”, line 1968, in maybe_infer_tz
f"data is already tz-aware {inferred_tz}, unable to "
TypeError: data is already tz-aware UTC, unable to set specified tz: UTC
no pickle file is saved as a result…any thoughts?