Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating database: v1 Traceback #73

Open
roughnecks opened this issue May 18, 2024 · 0 comments
Open

Migrating database: v1 Traceback #73

roughnecks opened this issue May 18, 2024 · 0 comments

Comments

@roughnecks
Copy link

I have this bug since a long time now:

$ git clone https://github.com/simplebot-org/simplebot_mastodon.git
$ cd simplebot_mastodon/
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install simplebot_mastodon

Installing collected packages: pydub, imap-tools, blurhash, urllib3, typing-extensions, soupsieve, six, python-magic, pycparser, py, pluggy,
Pillow, MarkupSafe, idna, html2text, greenlet, decorator, charset-normalizer, certifi, SQLAlchemy, requests, python-dateutil, Jinja2, cffi, b
eautifulsoup4, Mastodon.py, deltachat, simplebot, simplebot_mastodon
Successfully installed Jinja2-3.1.4 MarkupSafe-2.1.5 Mastodon.py-1.8.1 Pillow-10.3.0 SQLAlchemy-2.0.30 beautifulsoup4-4.12.3 blurhash-1.1.4 c
ertifi-2024.2.2 cffi-1.16.0 charset-normalizer-3.3.2 decorator-5.1.1 deltachat-1.136.2 greenlet-3.0.3 html2text-2024.2.26 idna-3.7 imap-tools
-1.6.0 pluggy-1.5.0 py-1.11.0 pycparser-2.22 pydub-0.25.1 python-dateutil-2.9.0.post0 python-magic-0.4.27 requests-2.31.0 simplebot-4.1.2 sim
plebot_mastodon-0.5.0 six-1.16.0 soupsieve-2.5 typing-extensions-4.11.0 urllib3-2.2.1

$ simplebot init email password
2024-05-18 10:28:41,956 - simplebot - INFO - Successfully configured email

$ simplebot serve
2024-05-18 10:29:12,588 - simplebot - INFO - bot listening at: email
2024-05-18 10:29:12,599 - simplebot - INFO - Done checking 0 accounts, sleeping for 30 seconds...
2024-05-18 10:29:42,615 - simplebot - INFO - Done checking 0 accounts, sleeping for 30 seconds...
2024-05-18 10:30:12,619 - simplebot - INFO - Done checking 0 accounts, sleeping for 30 seconds...
2024-05-18 10:30:42,576 - simplebot - INFO - processing incoming fresh message id=12
2024-05-18 10:30:42,931 - simplebot - INFO - Done checking 0 accounts, sleeping for 30 seconds...
2024-05-18 10:30:42,991 - simplebot - INFO - processing message=12 FINISHED
2024-05-18 10:31:07,594 - simplebot - INFO - processing incoming fresh message id=15
2024-05-18 10:31:07,932 - simplebot - INFO - processing message=15 FINISHED
2024-05-18 10:31:15,115 - simplebot - INFO - Done checking 0 accounts, sleeping for 28 seconds...
2024-05-18 10:31:45,268 - simplebot - INFO - Done checking 0 accounts, sleeping for 28 seconds...
2024-05-18 10:31:48,572 - simplebot - INFO - processing incoming fresh message id=23
2024-05-18 10:31:48,884 - simplebot - INFO - processing message=23 FINISHED
2024-05-18 10:32:15,437 - simplebot - INFO - Done checking 0 accounts, sleeping for 28 seconds...
2024-05-18 10:32:45,590 - simplebot - INFO - Done checking 0 accounts, sleeping for 28 seconds...
2024-05-18 10:33:15,754 - simplebot - INFO - Done checking 0 accounts, sleeping for 28 seconds...

At this point I'm logged in already, asked for /local and got messages back
Then I CTRL-C in terminal to shut the bot down

And I start it again:

$ simplebot serve
2024-05-18 10:33:22,489 - simplebot - INFO - Migrating database: v1
Traceback (most recent call last):
  File "/home/bots/simplebot_mastodon/.venv/bin/simplebot", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/bots/simplebot_mastodon/.venv/lib/python3.11/site-packages/simplebot/main.py", line 24, in main
    parser.main_run(bot=bot, args=args)
  File "/home/bots/simplebot_mastodon/.venv/lib/python3.11/site-packages/simplebot/parser.py", line 111, in main_run
    res = args.subcommand_instance.run(**kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bots/simplebot_mastodon/.venv/lib/python3.11/site-packages/simplebot/builtin/cmdline.py", line 233, in run
    bot.start()
  File "/home/bots/simplebot_mastodon/.venv/lib/python3.11/site-packages/simplebot/bot.py", line 396, in start
    self.plugins.hook.deltabot_start(bot=self)
  File "/home/bots/simplebot_mastodon/.venv/lib/python3.11/site-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bots/simplebot_mastodon/.venv/lib/python3.11/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bots/simplebot_mastodon/.venv/lib/python3.11/site-packages/pluggy/_callers.py", line 139, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/home/bots/simplebot_mastodon/.venv/lib/python3.11/site-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bots/simplebot_mastodon/.venv/lib/python3.11/site-packages/simplebot_mastodon/__init__.py", line 91, in deltabot_start
    run_migrations(bot)
  File "/home/bots/simplebot_mastodon/.venv/lib/python3.11/site-packages/simplebot_mastodon/migrations.py", line 42, in run_migrations
    migration(database)
  File "/home/bots/simplebot_mastodon/.venv/lib/python3.11/site-packages/simplebot_mastodon/migrations.py", line 48, in migrate1
    database.execute("ALTER TABLE account ADD COLUMN  muted_home BOOLEAN")
sqlite3.OperationalError: duplicate column name: muted_home

Debian 12
Thanks

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

No branches or pull requests

1 participant