You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
لحل المشكله:
1- حدث أحدث أصدار من مكتبة mega.py
2- حدث مكتبة tenacity الى أصدار 5.1.5
3- أحذف السطر الذي قبل الداله call
4- أدخل على ملف _asyncio.py وعدل الداله call الى هذا:
async def call(self, fn, *args, **kwargs): # أستخدم هنا async
self.begin(fn)
retry_state = RetryCallState(
retry_object=self, fn=fn, args=args, kwargs=kwargs)
while True:
do = self.iter(retry_state=retry_state)
if isinstance(do, DoAttempt):
try:
result = await fn(*args, **kwargs) # أستخدم هنا await
except BaseException:
retry_state.set_exception(sys.exc_info())
else:
retry_state.set_result(result)
elif isinstance(do, DoSleep):
retry_state.prepare_for_next_attempt()
await self.sleep(do) # أستخدم هنا await
else:
return do
The tenacity should be >= 5.1.5
tenacity>=5.1.5
The old versions of tenacity used
@asyncio.coroutine
and this causes an error:
AttributeError: module 'asyncio' has no attribute 'coroutine'
The text was updated successfully, but these errors were encountered: