Page MenuHomePhabricator

Upstream/fix mutiple issues with Sopel Quotes
Closed, ResolvedPublic


Problem: Help documentation for the .quote command (Sopel) in MirahezeBot is scant, at best. Another problem occurred when trying to recall a named quote using ".quote NAME OF QUOTE". Looking further into, @RhinosF1 traced it (see below trace) and said the Sopel seems to not like two bots sharing the same database


[2020-08-06 23:31:25,240]            ERROR    - Unexpected error (Multiple rows were found for one_or_none()) from MacFan4000 at 2020-08-06 23:31:25.240731. Message was: .quote 3
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/sopel/", line 606, in call
    exit_code = func(sopel, trigger)
  File "/usr/local/lib/python3.7/dist-packages/sopel_modules/quotes/", line 183, in get_quote    quote =[0].strip(), bot)
  File "/usr/local/lib/python3.7/dist-packages/sopel_modules/quotes/", line 88, in search
    res = session.query(QuotesDB).filter(QuotesDB.key == key).filter( == 1).one_or_none()
  File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/orm/", line 3436, in one_or_none
    "Multiple rows were found for one_or_none()"
sqlalchemy.orm.exc.MultipleResultsFound: Multiple rows were found for one_or_none()

Action needed: Remind @RhinosF1 to upstream and fix



Related Objects

Duplicates Merged Here
T74: Quotes error

Event Timeline

Will review on Monday but anyone can do this

RhinosF1 renamed this task from Upstream and fix .quote command bug to Upstream/fix mutiple issues with Sopel Quotes.Aug 7 2020, 7:23 AM
RhinosF1 claimed this task.