I installed the zipline but there is a key error when I import zipline.
I wonder if anyone could help.
KeyError Traceback (most recent call last)
Input In [20], in <cell line: 1>()
----> 1 from zipline.api import order, record, symbol
File ~\anaconda3\envs\env_zipline\lib\site-packages\zipline_init_.py:29, in
27 from .utils.numpy_utils import numpy_version
28 from .utils.pandas_utils import new_pandas
—> 29 from .utils.run_algo import run_algorithm
31 # These need to happen after the other imports.
32 from .algorithm import TradingAlgorithm
File ~\anaconda3\envs\env_zipline\lib\site-packages\zipline\utils\run_algo.py:24, in
22 from zipline.finance import metrics
23 from zipline.finance.trading import SimulationParameters
—> 24 from zipline.pipeline.data import USEquityPricing
25 from zipline.pipeline.loaders import USEquityPricingLoader
27 import zipline.utils.paths as pth
File ~\anaconda3\envs\env_zipline\lib\site-packages\zipline\pipeline_init_.py:1, in
----> 1 from .classifiers import Classifier, CustomClassifier
2 from .domain import Domain
3 from .factors import Factor, CustomFactor
File ~\anaconda3\envs\env_zipline\lib\site-packages\zipline\pipeline\classifiers_init_.py:1, in
----> 1 from .classifier import (
2 Classifier,
3 CustomClassifier,
4 Quantiles,
5 Everything,
6 Latest,
7 )
9 all = [
10 “Classifier”,
11 “CustomClassifier”,
(…)
14 “Quantiles”,
15 ]
File ~\anaconda3\envs\env_zipline\lib\site-packages\zipline\pipeline\classifiers\classifier.py:22, in
16 from zipline.pipeline.dtypes import (
17 CLASSIFIER_DTYPES,
18 FACTOR_DTYPES,
19 FILTER_DTYPES,
20 )
21 from zipline.pipeline.sentinels import NotSpecified
—> 22 from zipline.pipeline.term import ComputableTerm
23 from zipline.utils.compat import unicode
24 from zipline.utils.input_validation import expect_types, expect_dtypes
File ~\anaconda3\envs\env_zipline\lib\site-packages\zipline\pipeline\term.py:45, in
32 from zipline.utils.numpy_utils import (
33 bool_dtype,
34 categorical_dtype,
(…)
37 float64_dtype,
38 )
39 from zipline.utils.sharedoc import (
40 templated_docstring,
41 PIPELINE_ALIAS_NAME_DOC,
42 PIPELINE_DOWNSAMPLING_FREQUENCY_DOC,
43 )
—> 45 from .domain import Domain, GENERIC, infer_domain
46 from .downsample_helpers import expect_downsample_frequency
47 from .sentinels import NotSpecified
File ~\anaconda3\envs\env_zipline\lib\site-packages\zipline\pipeline\domain.py:27, in
23 import pytz
25 from zipline.utils.calendar_utils import get_calendar
—> 27 from zipline.country import CountryCode
28 from zipline.utils.formatting import bulleted_list
29 from zipline.utils.input_validation import expect_types, optional
File ~\anaconda3\envs\env_zipline\lib\site-packages\zipline\country.py:10, in
6 def code(name):
7 return countries_by_name[name].alpha2
—> 10 class CountryCode(object):
11 “”“A simple namespace of iso3166 alpha2 country codes.”""
13 ARGENTINA = code(“ARGENTINA”)
File ~\anaconda3\envs\env_zipline\lib\site-packages\zipline\country.py:55, in CountryCode()
53 TAIWAN = code(“TAIWAN, PROVINCE OF CHINA”)
54 THAILAND = code(“THAILAND”)
—> 55 TURKEY = code(“TURKEY”)
56 UNITED_KINGDOM = code(“UNITED KINGDOM OF GREAT BRITAIN AND NORTHERN IRELAND”)
57 UNITED_STATES = code(“UNITED STATES OF AMERICA”)
File ~\anaconda3\envs\env_zipline\lib\site-packages\zipline\country.py:7, in code(name)
6 def code(name):
----> 7 return countries_by_name[name].alpha2
KeyError: ‘TURKEY’