내 앱용 동기식 JsonStorage를 사용하며 비동기식으로 전환하려고합니다.python kivy async storage
내 동기 호출했다 :
store.exists(store_index)
내 작동하지 비동기 호출은 다음과 같습니다
store.exists(key=store_index,callback=callback_function)
TypeError: exists() got an unexpected keyword argument 'callback'
나는 또한 시도했다 :
def callback_function(store,key,result):
print "exists:",result
store.exists(store_index, callback=callback_function)
이 비동기 호출은 다음과 같은 예외가 발생 이 :
store.async_exists(store_index, callback=callback_function)
그러나이 제기 : 내가 무슨 잘못을하고있는 중이 야
File "main.py", line 199, in __init__ store.async_exists(key=store_index,callback=colorButtonCallback)
File "/home/mike/Dokumente/py-spielwiese/venv/local/lib/python2.7/sitepackages/kivy/storage/__init__.py", line 152, in async_existskey=key, callback=callback)
TypeError: _schedule() got multiple values for keyword argument 'callback'
? 당신은 세부 정보를 볼 async_exists을 읽을 수
store.async_exists(callback_function, store_index)
:
알아두면 좋을 것 같습니다. – Anzel