Code Monkey home page Code Monkey logo

Comments (1)

mr-wh1tehat avatar mr-wh1tehat commented on July 18, 2024

Bot is crashing while uploading downloaded files to telegram:
Heroku log:
2021-08-10T05:25:51.318612+00:00 app[worker.1]: await upload_files(client, reply, abs_files(download_dir, download.files), os_path_join(download_dir, download.name + '.zip'))
2021-08-10T05:25:51.318612+00:00 app[worker.1]: File "/app/bot/handlers/leech_handler.py", line 89, in upload_files
2021-08-10T05:25:51.318613+00:00 app[worker.1]: await upload_to_tg_handler.func(
2021-08-10T05:25:51.318613+00:00 app[worker.1]: File "/app/bot/handlers/upload_to_tg_handler.py", line 107, in func
2021-08-10T05:25:51.318614+00:00 app[worker.1]: await upload_fn(
2021-08-10T05:25:51.318615+00:00 app[worker.1]: File "/app/venv/lib/python3.9/site-packages/pyrogram/client/methods/messages/send_document.py", line 141, in send_document
2021-08-10T05:25:51.318615+00:00 app[worker.1]: if os.path.exists(document):
2021-08-10T05:25:51.318615+00:00 app[worker.1]: File "/usr/lib/python3.9/genericpath.py", line 19, in exists
2021-08-10T05:25:51.318615+00:00 app[worker.1]: os.stat(path)
2021-08-10T05:25:51.318616+00:00 app[worker.1]: TypeError: stat: path should be string, bytes, os.PathLike or integer, not FileIO

EDIT :
This issue can be fixed by adding "appdirs" in "requirements.txt. So that I'm closing this issue, Thank you Azamaulana for this awesome code!

from botkaca.

Related Issues (20)

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.