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

Errbot version 6.0.0+ fails to start because "Found more that one plugin for <class 'errbot.core.ErrBot'>" #1484

Closed
1 of 5 tasks
tmcevoy14 opened this issue Dec 4, 2020 · 12 comments

Comments

@tmcevoy14
Copy link

tmcevoy14 commented Dec 4, 2020

In order to let us help you better, please fill out the following fields as best you can:

I am...

  • Reporting a bug
  • Suggesting a new feature
  • Requesting help with running my bot
  • Requesting help writing plugins
  • Here about something else

I am running...

  • Errbot version: 6.1.6
  • OS version: CentOS 7.8.2003
  • Python version: 3.6.8
  • Using a virtual environment: yes

Issue description

I'm trying to upgrade our errbot version from 5.2.0 to 6.1.6 and after upgrading to version 6.1.6 errbot fails to start because of this error:
Found more that one plugin for <class 'errbot.core.ErrBot'>.

We are using errbot with the slack configuration and only have one backend defined. Any suggestions?

Our requirements.txt file looks like this:

pytz==2020.1           # (2020-04-20) - latest version
datadog==0.19.0        # (2018-06-04)
pyOpenSSL==17.5.0      # (2017-11-30)
errbot[slack]==6.1.6   # (2020-11-16) - latest version
slackclient==1.0.6     # (2017-08-02)
Markdown==3.3.3        # (2020-10-25) - latest version
pytest==3.7.1          # (2018-08-02)
paramiko==2.7.1        # (2019-12-09) - latest version
GitPython==2.1.11      # (2018-07-11)
black==20.8b1

We are using a custom slack backend that updates a few things for our use case:
BACKEND = 'CustomSlack'
BOT_EXTRA_BACKEND_DIR = os.getenv('BACKENDS_PATH', '/srv/backends')

And then our Custom Slack backend looks something like this (which is copied into /srv/backends when we build the image):

from plugins.libs.common import ui_blocks
from errbot.backends.base import Message
from errbot.backends.slack import (
    SlackBackend,
    SlackPerson,
    SlackRoomOccupant,
    SlackBot,
    SlackRoomBot,
    SlackRoom,
    SlackAPIResponseError,
)

log = logging.getLogger(__name__)


class CustomSlack(SlackBackend):
[Core]
Name = CustomSlack
Module = udemy_slack

[Python]
Version = 2+

[Documentation]
Description = Test stuff

Steps to reproduce

Upgrade to 6.1.6 and run errbot

Upgrade to
6.1.6 or 6.0.0

Additional info

none

@tmcevoy14
Copy link
Author

Hi @sijis, can I get some support on this issue? It's blocking us from upgrading to version 6 of errbot and also upgrading our slackclient.

@nzlosh
Copy link
Contributor

nzlosh commented Jan 7, 2021

What version of python are you using to run errbot 5.2.0?

@tmcevoy14
Copy link
Author

We're using python 3.6.8 to run errbot 5.2.0, and for the upgrade to errbot v6.

@nzlosh
Copy link
Contributor

nzlosh commented Jan 7, 2021

I've encountered this error too. The error comes from the multiple inheritance:
CustomSlack > SlackBackend > Errbot

I workaround the issue by removing the multiple inheritance, but you in your case this won't be useful. My guess is this PR may have change the behaviour of the import, but it's speculation.

@tmcevoy14
Copy link
Author

Looks like the cause of the issue - I wonder if it can be reverted or what the reasoning for it was?

@nzlosh
Copy link
Contributor

nzlosh commented Jan 7, 2021

It will need to be confirmed as being the cause of the issue. I'm not sure if it can be reverted now or a new patch will need to be devised.

@tmcevoy14
Copy link
Author

@sijis @gbin @attakei any idea if this could be fixed? Or if there's a workaround?

@sijis
Copy link
Contributor

sijis commented Jan 12, 2021

@tmcevoy14 I haven't been able to look at this.hopefully it's something I can review in the next week.

Something that you can try is basically copying the slack backend into your custom one and try to remove a layer of inheritance. It's not perfect but it should allow you to validate other items to address in the migration.

@tmcevoy14
Copy link
Author

Hey @sijis, any update on this?

@sijis
Copy link
Contributor

sijis commented Feb 12, 2021

Its possible you are hitting this bug #1505.

@tmcevoy14
Copy link
Author

Thanks for the update @sijis, will that PR be merged soon?

@sijis
Copy link
Contributor

sijis commented Jun 8, 2022

PR merged. should be in master.

@sijis sijis closed this as completed Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants