adityathebe / telegramForwarder

Telegram bot to forward messages
162 stars 116 forks source link

Error on creating Mysql Databases and configuring main.py #1

Closed CDN18 closed 4 years ago

CDN18 commented 4 years ago

I'm excited seeing this repository that is extremely useful for me. However I cannot finish the setup of the bot according to the guidance of README.md

In step 2, When executing ./bot/db/init.sql , it says:

ERROR 3780 (HY000): Referencing column 'owner' and referenced column 'chat_id' in foreign key constraint 'redirections_fk0' are incompatible.

In step 6, the config-sample.py was deleted in previous commits, so I'm not sure how to config the main.py I repleced API_PORT with 443 and replaced Api Id and Hash Id with what telegram provides me. But I cannot execute server.py and recieves the error below:

Traceback (most recent call last):
  File "server.py", line 3, in <module>
    from config.main import DB_SESSION_DBNAME, DB_host, DB_passwd, DB_user
  File "/home/cdn/telegramForwarder/agent/config/main.py", line 3, in <module>
    API_PORT = os.environ['443']
  File "/usr/lib/python3.8/os.py", line 675, in __getitem__
    raise KeyError(key) from None
KeyError: '443'

I'm using MySQL Ver 8.0.19-0ubuntu5 for Linux on x86_64 , python3.8 and Ubuntu 20.04 Desktop. Many thanks for noticing!

adityathebe commented 4 years ago

This repository is a mess right now. I myself haven't been able to get this up and running. I'm working on dockerizing this whole application.

CDN18 commented 4 years ago

Oh okay, thanks for developing and looking foward for the first release😀