mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-02 05:14:14 +08:00
DOC: Add more information to IncompatibleHistoryFrequency message.
This commit is contained in:
+3
-2
@@ -167,5 +167,6 @@ class IncompatibleHistoryFrequency(ZiplineError):
|
||||
At least, not yet.
|
||||
"""
|
||||
msg = """
|
||||
Minute history requires minute frequency input data.
|
||||
Either use daily history or provide minute frequency data.""".strip()
|
||||
Requested history at frequency '{frequency}' cannot be created with data
|
||||
at frequency '{data_frequency}'.
|
||||
""".strip()
|
||||
|
||||
@@ -249,7 +249,10 @@ class HistorySpec(object):
|
||||
if isinstance(frequency, str):
|
||||
frequency = Frequency(frequency, daily_at_midnight)
|
||||
if frequency.unit_str == 'm' and data_frequency == 'daily':
|
||||
raise IncompatibleHistoryFrequency()
|
||||
raise IncompatibleHistoryFrequency(
|
||||
frequency=frequency.unit_str,
|
||||
data_frequency=data_frequency,
|
||||
)
|
||||
|
||||
# The frequency at which the data is sampled.
|
||||
self.frequency = frequency
|
||||
|
||||
Reference in New Issue
Block a user