Code Monkey home page Code Monkey logo

telegramftp's Introduction

Stand With Ukraine

RuslanUC

Tools I use / have used:

Languages:

Frameworks/libraries:

Databases/infrastructure:

Other:

Total time coded since Mar 16 2023

telegramftp's People

Contributors

ruslanuc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

bellyfat aiwabr

telegramftp's Issues

change the size of chunk to 80 and asleep 3s to avoid flood

Hi there!
Thanks for your project!

I met an error while tried to use it which said:

pyrogram.errors.exceptions.flood_420.FloodWait: Telegram says: [420 FLOOD_WAIT_X] - A wait of 20 seconds is required (caused by "messages.SendMedia")

So, I made some changes to the file pathio.py like
line 87:
async for data in stream.iter_by_block(1024102480):
line 94
await asleep(3)
line 112
for _o in range(o, o+80)
line 114
o += 80

then it works!

However, there is still a problem:
the FTP client wouldn't stop automatically after finishing upload; instead, it would restart the same upload(s) again, here are the logs:

Task exception was never retrieved
future: <Task finished name='Task-5205' coro=<MongoDBUserManager.notify_logout() done, defined at /www/bot/TelegramFTP/ftp/server.py:113> exception=ValueError('Too many releases')>
Traceback (most recent call last):
File "/www/bot/TelegramFTP/ftp/server.py", line 114, in notify_logout
self.available_connections[user].release()
File "/www/bot/TelegramFTP/ftp/server.py", line 171, in release
raise ValueError("Too many releases")
ValueError: Too many releases
Task exception was never retrieved
future: <Task finished name='Task-5208' coro=<MongoDBUserManager.notify_logout() done, defined at /www/bot/TelegramFTP/ftp/server.py:113> exception=ValueError('Too many releases')>
Traceback (most recent call last):
File "/www/bot/TelegramFTP/ftp/server.py", line 114, in notify_logout
self.available_connections[user].release()
File "/www/bot/TelegramFTP/ftp/server.py", line 171, in release
raise ValueError("Too many releases")
ValueError: Too many releases

Could you give suggestions on how to make it stop after finishing upload? Thanks!

FileZilla upload failed

Hi, thank you for your software. I really love the concept, and your setup documentation is easy to follow.

Unfortunately, I run into following issue.
I tried to upload a dummy file using FileZilla, 50MiB in size. The upload seems to be working at first, saying it is 100% uploaded.
But after a while it stuck at 100% and did not move to Successful transfer tab.
I notice in the Telegram channel, some files named "file" showed up with size 16+16+16+2 MiB respectively, and those files shows up 3 times, so 12 files in total, 150 MiB in size.
After sometimes, the transfer in FileZilla move to Failed transfers tab with reason=timeout.
And after a while, I can see in the terminal following error

root@mush:~/TelegramFTP# python3 ./main.py
FTP server starting...
Task exception was never retrieved
future: <Task finished name='Task-2329' coro=<MongoDBUserManager.notify_logout() done, defined at /root/TelegramFTP/ftp/server.py:113> exception=ValueError('Too many releases')>
Traceback (most recent call last):
  File "/root/TelegramFTP/ftp/server.py", line 114, in notify_logout
    self.available_connections[user].release()
  File "/root/TelegramFTP/ftp/server.py", line 171, in release
    raise ValueError("Too many releases")
ValueError: Too many releases

Please help me to fix the issue. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.