Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

Problems with mysql #69

Closed
KaratekHD opened this issue Jan 2, 2020 · 3 comments
Closed

Problems with mysql #69

KaratekHD opened this issue Jan 2, 2020 · 3 comments

Comments

@KaratekHD
Copy link

KaratekHD commented Jan 2, 2020

Hello,

First of all, I know Marie is down, but I am hoping for help anyway.
I am actually trying to host this project on my own, but I can't get the bot starting.
I am using Mysql as database backend, with this line in config.py:

SQLALCHEMY_DATABASE_URI = 'mysql://root:9wTEfjyg9EmNGtRt@localhost:3306/nemesis'

But I am getting an error as followed:

2020-01-02 11:35:51,109 - tg_bot - INFO - Not loading: ['translation', 'rss', 'sed']
2020-01-02 11:35:51,110 - tg_bot - INFO - Modules to load: ['admin', 'afk', 'antiflood', 'backups', 'bans', 'blacklist', 'cust_filters', 'disable', 'global_bans', 'locks', 'log_channel', 'misc', 'msg_deleting', 'muting', 'notes', 'reporting', 'rules', 'userinfo', 'users', 'warns', 'welcome']
Traceback (most recent call last):
  File "/usr/lib64/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/jens/tgbot/tg_bot/__main__.py", line 74, in <module>
    imported_module = importlib.import_module("tg_bot.modules." + module_name)
  File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/jens/tgbot/tg_bot/modules/admin.py", line 12, in <module>
    from tg_bot.modules.disable import DisableAbleCommandHandler
  File "/home/jens/tgbot/tg_bot/modules/disable.py", line 19, in <module>
    from tg_bot.modules.sql import disable_sql as sql
  File "/home/jens/tgbot/tg_bot/modules/sql/__init__.py", line 16, in <module>
    SESSION = start()
  File "/home/jens/tgbot/tg_bot/modules/sql/__init__.py", line 9, in start
    engine = create_engine(DB_URI, client_encoding="utf8")
  File "/usr/lib/python3.7/site-packages/sqlalchemy/engine/__init__.py", line 479, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/sqlalchemy/engine/strategies.py", line 173, in create
    engineclass.__name__,
TypeError: Invalid argument(s) 'client_encoding' sent to create_engine(), using configuration MySQLDialect_mysqldb/QueuePool/Engine.  Please check that the keyword arguments are appropriate for this combination of components.

What am I doing wrong?
Thanks for your help.

EDIT: Fix Typo

@PaulSonOfLars
Copy link
Owner

As you can see in the readme, Marie uses postgres. Mysql is not supported.

@KaratekHD
Copy link
Author

KaratekHD commented Jan 2, 2020

Alright, I thought since you wrote:

Replace sqldbtype with whichever db youre using (eg postgres, mysql, sqllite, etc) repeat for your username, password, hostname (localhost?), port (5432?), and db name.

Mysql would be possible too.
Thanks anyway!

@PaulSonOfLars
Copy link
Owner

Yeah, that's a mistake in the readme, sorry

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants