microsoft/qlib · error · ValueError
Wrong input
Error message
Wrong input
What it means
Error "Wrong input" thrown in microsoft/qlib.
Source
Thrown at qlib/utils/time.py:373
----------
date_time : pd.Timestamp
the original time
direction : str
the direction the time are going to
- "backward" for going to history
- "forward" for going to the future
Returns
-------
pd.Timestamp:
the shifted time
"""
if direction == "backward":
return date_time - pd.Timedelta(seconds=1)
elif direction == "forward":
return date_time + pd.Timedelta(seconds=1)
else:
raise ValueError("Wrong input")
if __name__ == "__main__":
print(get_day_min_idx_range("8:30", "14:59", "10min", REG_CN))
View on GitHub (pinned to 79633dd950)
Solutions
- Check the arguments passed to the time utility; the input could not be parsed.
- Pass a valid time string, datetime, or pd.Timestamp as documented.
When it happens
Trigger: This error is raised at qlib/utils/time.py:373 when the guard condition fails: "Wrong input". It triggers when the code path receives input or a state that violates the precondition checked at this point — e.g. an unimplemented abstract method being called, an unsupported argument type/value, or an invalid configuration. To avoid it, satisfy the documented precondition before this call: implement the required method in your subclass, or pass a supported value of the expected type as described by the message.
Common situations: See trigger scenarios.
AI-assisted analysis of microsoft/qlib@79633dd950 (2026-08-15).
Data as JSON: /api/errors/9e94f7358d5f3c7f.
Report an issue: GitHub.