Need help with replit hosting

I have a code for backup files to cloud drive (yandex_disk) and backup it when code start, but it’s not working on Replit, and give this error:

Traceback (most recent call last):
File “”, line 14, in
import backup
File “/home/runner/UniBotDiscord/”, line 1, in
import yadisk_async
File “/home/runner/UniBotDiscord/venv/lib/python3.8/site-packages/yadisk_async/”, line 3, in
from . import api, objects, exceptions, utils
File “/home/runner/UniBotDiscord/venv/lib/python3.8/site-packages/yadisk_async/api/”, line 4, in
from .api_request import *
File “/home/runner/UniBotDiscord/venv/lib/python3.8/site-packages/yadisk_async/api/”, line 7, in
from …utils import auto_retry, get_exception
File “/home/runner/UniBotDiscord/venv/lib/python3.8/site-packages/yadisk_async/”, line 8, in
from .objects import ErrorObject
File “/home/runner/UniBotDiscord/venv/lib/python3.8/site-packages/yadisk_async/objects/”, line 6, in
from .disk import *
File “/home/runner/UniBotDiscord/venv/lib/python3.8/site-packages/yadisk_async/objects/”, line 5, in
from …common import str_or_error, bool_or_error, int_or_error
File “/home/runner/UniBotDiscord/venv/lib/python3.8/site-packages/yadisk_async/”, line 115, in
Callable[, AsyncIterable[bytes, None]]]
File “/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/”, line 261, in inner
return func(*args, **kwds)
File “/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/”, line 686, in getitem
_check_generic(self, params)
File “/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/”, line 215, in _check_generic
raise TypeError(f"Too {‘many’ if alen > elen else ‘few’} parameters for {cls};"
TypeError: Too many parameters for typing.AsyncIterable; actual 2, expected 1

Code for backup is:
import yadisk_async
import os, json
import asyncio, aiofiles
from dotenv import load_dotenv, find_dotenv
from datetime import datetime as dt
from pytz import timezone

from log_main import logger


async def upload_files(session, file_name, time):
async with, ‘rb’) as f:
await session.upload(f, f’UniBot Backup/{time}/{file_name}‘)
except yadisk_async.exceptions.PathExistsError:
else:’[+] {file_name} is upload successful in folder : {time}')

async def start_backup(files):
tasks =
async with yadisk_async.YaDisk(token=os.environ[‘yandex_token’]) as yandex:
if not await yandex.exists(‘UniBot Backup’):
await yandex.mkdir(‘UniBot Backup’)

	date ="UTC"))
	date = date.strftime("%Y-%m-%d %H:%M")
	if not await yandex.exists(f'UniBot Backup/{date}'):
		await yandex.mkdir(f'UniBot Backup/{date}')

	for file_name in files:
		if os.path.exists(file_name):
			task = asyncio.get_event_loop().create_task(upload_files(yandex, file_name, date))

	await asyncio.gather(*tasks)	

if name == ‘main’:
file_names = [

seems like an issue in the yadisk_async package :person_shrugging:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.