在jupyter里使用get_price报错,
rb888_raw = rqdatac.get_price('RB888', '20230301', '20230331', '1m')
TypeError Traceback (most recent call last)
Cell In[9], line 1
----> 1 rb888_raw = rqdatac.get_price('RB888', '20230301', '20230331', '1m')
File c:\veighna_studio\lib\site-packages\rqdatac\decorators.py:150, in compatible_with_parm..wrap(args, **kwargs)
148 if item != value:
149 raise ValueError("'{}': except '{}', got '{}'".format(name, value, item))
--> 150 return func(args, **kwargs)
File c:\veighna_studio\lib\site-packages\rqdatac\services\get_price.py:86, in get_price(order_book_ids, start_date, end_date, frequency, fields, adjust_type, skip_suspended, expect_df, time_slice, market, kwargs)
83 raise ValueError("time_slice: invalid, expect tuple or list value like ('09:55', '10:11'), got {}".format(time_slice))
84 start, end = to_time(time_slice[0]), to_time(time_slice[1])
---> 86 df = _get_price(
87 order_book_ids, start_date, end_date, frequency,
88 fields, adjust_type, skip_suspended, expect_df, market, kwargs
89 )
91 if df is None or not sliceable or not time_slice:
92 # 非tick、minbar或者不指定切片时间,直接返回
93 return df
File c:\veighna_studio\lib\site-packages\rqdatac\decorators.py:67, in retry..decorate..wrap(args, **kwargs)
65 while c > 0:
66 try:
---> 67 return func(args, **kwargs)
...
4129 )
4130 indexer = key
4131 else:
TypeError: Slicing a positional slice with .loc is not allowed, Use .loc with labels or .iloc with positions instead.
以前也用get_price,没出现过这个问题,不知道为什么现在会报错。现在使用query_bar_history则不报错,照道理query_bar_history里也调用get_price了,问什么会出现这种情况呢