Giter Club home page Giter Club logo

opendistortbot's Introduction

Deprecated!!! Please use OpenDistortBot-rs

OpenDistortBot

An Open Source Image distortion telegram bot based on @DistortBot

Usage :- python3.7 distortion_bot.py

Send picture to the bot

Reply to your(or any) picture with /distort

Requirements:-

  • aiogram

Prerequisites

  • ImageMagick 7 with liblqr delegate:

    Ubuntu's default ppa doesn't have IM7! You can build it from source https://imagemagick.org/script/install-source.php. Before installing IM7 however, make sure you have installed liblqr-1.0-dev

  • Python 3.7(required for aiogram)

Credits

@Mezgrman for original bot and helping me in making this one

opendistortbot's People

Contributors

rupansh avatar

Stargazers

 avatar joshua_word_2 avatar Bj4rne avatar Isane DV avatar Woolfy avatar Ahmad zaky avatar  avatar fadhlu avatar Alexandre Malfreyt avatar  avatar Ioneliness avatar Stephen Potter avatar Ilya avatar Danylo Velikiy avatar  avatar Alex avatar Vlad Khapin avatar Gerardo avatar Alexey Cherepanov avatar Sergio Sánchez Vallés avatar roddy avatar x0x8x avatar

Watchers

Cato avatar  avatar x0x8x avatar  avatar

opendistortbot's Issues

Heroku

Hi, is it possible to launch your bot on heroku?

IOError: [Errno 2] No such file or directory

Tried with relative and absolute paths:

  File "distortion_bot.py", line 41, in <module>
    bot.polling()
  File "/usr/local/lib/python2.7/dist-packages/telebot/__init__.py", line 389, in polling
    self.__threaded_polling(none_stop, interval, timeout)
  File "/usr/local/lib/python2.7/dist-packages/telebot/__init__.py", line 413, in __threaded_polling
    self.worker_pool.raise_exceptions()
  File "/usr/local/lib/python2.7/dist-packages/telebot/util.py", line 108, in raise_exceptions
    six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
  File "/usr/local/lib/python2.7/dist-packages/telebot/util.py", line 59, in run
    task(*args, **kwargs)
  File "distortion_bot.py", line 35, in photudl
    photo = open('result/'+file_name, 'rb')
IOError: [Errno 2] No such file or directory: 'result/2.jpg'

&

  File "distortion_bot.py", line 41, in <module>
    bot.polling()
  File "/usr/local/lib/python2.7/dist-packages/telebot/__init__.py", line 389, in polling
    self.__threaded_polling(none_stop, interval, timeout)
  File "/usr/local/lib/python2.7/dist-packages/telebot/__init__.py", line 413, in __threaded_polling
    self.worker_pool.raise_exceptions()
  File "/usr/local/lib/python2.7/dist-packages/telebot/util.py", line 108, in raise_exceptions
    six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
  File "/usr/local/lib/python2.7/dist-packages/telebot/util.py", line 59, in run
    task(*args, **kwargs)
  File "distortion_bot.py", line 35, in photudl
    photo = open('/home/twitter/telegram/OpenDistortBot/result/'+file_name, 'rb')
IOError: [Errno 2] No such file or directory: '/home/twitter/telegram/OpenDistortBot/result/82.jpg'

Unable to get it to work.

This is reply to:
/distort
Bot doesn't react on pictures sent.

~/OpenDistortBot# sudo python3 distortion_bot.py
Task exception was never retrieved
future: <Task finished coro=<Dispatcher._process_polling_updates() done, defined at /usr/local/lib/python3.7/dist-packages/aiogram-2.1.1.dev1-py3.7.egg/aiogram/dispatcher/dispatcher.py:274> exception=AttributeError("'NoneType' object has no attribute 'photo'")>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/aiogram-2.1.1.dev1-py3.7.egg/aiogram/dispatcher/dispatcher.py", line 282, in _process_polling_updates
    for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):
  File "/usr/local/lib/python3.7/dist-packages/aiogram-2.1.1.dev1-py3.7.egg/aiogram/dispatcher/dispatcher.py", line 142, in process_updates
    return await asyncio.gather(*tasks)
  File "/usr/local/lib/python3.7/dist-packages/aiogram-2.1.1.dev1-py3.7.egg/aiogram/dispatcher/handler.py", line 117, in notify
    response = await handler_obj.handler(*args, **partial_data)
  File "/usr/local/lib/python3.7/dist-packages/aiogram-2.1.1.dev1-py3.7.egg/aiogram/dispatcher/dispatcher.py", line 162, in process_update
    return await self.message_handlers.notify(update.message)
  File "/usr/local/lib/python3.7/dist-packages/aiogram-2.1.1.dev1-py3.7.egg/aiogram/dispatcher/handler.py", line 117, in notify
    response = await handler_obj.handler(*args, **partial_data)
  File "distortion_bot.py", line 49, in dodistort
    if message.reply_to_message.photo or message.reply_to_message.sticker:
AttributeError: 'NoneType' object has no attribute 'photo'

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.