Coder Social home page Coder Social logo

powerjungle / fbridge-asyncio Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 3.0 124 KB

facebook bridge used with matterbridge

Home Page: https://github.com/42wim/matterbridge

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
matterbridge facebook python3 python api-client bridge messenger

fbridge-asyncio's People

Contributors

powerjungle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fbridge-asyncio's Issues

Unable to send picture

I made today bridge between Telegram and Messenger using matterbridge.
Everything is working fine, but I am unable to send pictures. Receiving of images is working.

INFO:root:From api received json: {'text': '', 'channel': '-************', 'username': '', 'userid': '***********', 'avatar': '', 'account': 'telegram.messenger', 'event': '', 'protocol': 'telegram', 'gateway': 'Veronika', 'parent_id': '', 'timestamp': '2021-01-24T20:25:32.017259209+01:00', 'id': '', 'Extra': {'file': [{'Name': 'photo_2021-01-24_20-24-57.jpg', 'Data': ' ........ Here was the data ......', 'Comment': 'test', 'URL': '', 'Size': 0, 'Avatar': False, 'SHA': ''}]}} INFO:root:From api sending message: username: | text: ERROR:root:#1545023 Správa sa nedá poslať: Zdá sa, že sa pokúšate poslať prázdnu správu. Napíšte svoju správu a skúste to znova.

That error is talking that I am trying to send empty message

I have an error of logging

Paullux@dvkbuntu:~/fbridge-asyncio$ python3 fbridge-asyncio.py
INFO:root:Logging started
INFO:root:Found empty fb_dtsg, the session was probably invalid.
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fcded98c0d0>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7fcded9a57c0>, 3775571.95251181)]']
connector: <aiohttp.connector.TCPConnector object at 0x7fcded98c100>
ERROR:root:Session could not be loaded, login instead!
Password:
Traceback (most recent call last):
  File "fbridge-asyncio.py", line 325, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.8/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "fbridge-asyncio.py", line 304, in main
    session = await fbchat.Session.login(getpass.getuser(), getpass.getpass())
  File "/home/Paullux/.local/lib/python3.8/site-packages/fbchat/_session.py", line 416, in login
    raise _exception.NotLoggedIn(error)
fbchat.NotLoggedIn: Le mot de passe entré est incorrect. Vous lavez oublié ?
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fcded98c130>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7fcded9b9e20>, 3775579.56332407)]']
connector: <aiohttp.connector.TCPConnector object at 0x7fcded98c0d0>

any support for implementing this script on heroku?

Hello i've been using this script for days now, however i can't manage to deploy it on Heroku with my matterbridge bot, because whenever i turn the bot on i get attribute errors like this one, i changed the filename to 'fb.py' to think that this might be the issue....

heroku[worker.1]: State changed from starting to up
2021-02-26T16:20:27.993899+00:00 app[worker.1]: Traceback (most recent call last):
2021-02-26T16:20:27.994046+00:00 app[worker.1]: File "fb.py", line 382, in
2021-02-26T16:20:27.994625+00:00 app[worker.1]: asyncio.run(main())
2021-02-26T16:20:27.994807+00:00 app[worker.1]: AttributeError: module 'asyncio' has no attribute 'run'

any tips or ideas on how to fix this? anyways thanks for this bridge i really appreciate it.

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.