FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use ser.iloc[pos]
title=data['股票代码'][0],
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 406, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call
return await self.app(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/applications.py", line 113, in call
await self.middleware_stack(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/middleware/errors.py", line 187, in call
raise exc
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/middleware/errors.py", line 165, in call
await self.app(scope, receive, _send)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
raise exc
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
await app(scope, receive, sender)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/routing.py", line 715, in call
await self.middleware_stack(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/routing.py", line 735, in app
await route.handle(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/routing.py", line 288, in handle
await self.app(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
raise exc
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
await app(scope, receive, sender)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/routing.py", line 73, in app
response = await f(request)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fastapi/routing.py", line 301, in app
raw_response = await run_endpoint_function(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
return await dependant.call(**values)
File "/Users/weene/develop/Python/smalltools/stock_alarm.py", line 109, in plot_stock_chart
img_base64 = plot_candlestick_with_fibonacci(data, input_date)
File "/Users/weene/develop/Python/smalltools/stock_alarm.py", line 50, in plot_candlestick_with_fibonacci
mpf.plot(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mplfinance/plotting.py", line 412, in plot
config = _process_kwargs(kwargs, _valid_plot_kwargs())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mplfinance/_arg_validators.py", line 350, in _process_kwargs
raise TypeError('kwarg "'+key+'" validator returned False for value: "'+str(value)+'"\n '+v)
TypeError: kwarg "title" validator returned False for value: "300782"
'Validator' : lambda value: isinstance(value,(str,dict)) },