Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
K Dhanesh
@dhanupreeth_twitter
thanks, already I tried got the below error
21:14:44 INFO     errbot.bootstrap          Found Storage plugin: Shelf.
Traceback (most recent call last):
  File "/Users/dhanesh/.pyenv/versions/3.9.0/bin/errbot", line 8, in <module>
    sys.exit(main())
  File "/Users/dhanesh/.pyenv/versions/3.9.0/lib/python3.9/site-packages/errbot/cli.py", line 395, in main
    bootstrap(backend, root_logger, config, restore)
  File "/Users/dhanesh/.pyenv/versions/3.9.0/lib/python3.9/site-packages/errbot/bootstrap.py", line 257, in bootstrap
    bot = setup_bot(bot_class, logger, config, restore)
  File "/Users/dhanesh/.pyenv/versions/3.9.0/lib/python3.9/site-packages/errbot/bootstrap.py", line 166, in setup_bot
    backendpm = BackendPluginManager(
  File "/Users/dhanesh/.pyenv/versions/3.9.0/lib/python3.9/site-packages/errbot/backend_plugin_manager.py", line 51, in __init__
    raise PluginNotFoundException(
errbot.backend_plugin_manager.PluginNotFoundException: Could not find the plugin named SlackV3 in ['/Users/dhanesh/.pyenv/versions/3.9.0/lib/python3.9/site-packages/errbot/backends’].
Carlos
@nzlosh
You need to installed it. Follow the instructions in the README.
K Dhanesh
@dhanupreeth_twitter
Sure let me try that, I’m using Mac. I’m not able to fix it.
but let me try and will update.
Carlos
@nzlosh
Errbot isn't tested on Mac so it might be an issue. Especially if it's using M1 architecture.
K Dhanesh
@dhanupreeth_twitter
I’m using intel. still I couldn’t resolve it.
K Dhanesh
@dhanupreeth_twitter

@nzlosh In my app location, I’ve created backend directory and cloned the following repo - https://github.com/errbotio/err-backend-slackv3 and then installed via pip install -r ./backend/err-backend-slackv3/requirements.txt Updated the config.py

BOT_EXTRA_BACKEND_DIR="mypath/backend”

And started the app, now getting this error.

21:38:07 ERROR    errbot.backends.base      Exception occurred in serve_once:
Traceback (most recent call last):
  File "/Users/dhanesh/.pyenv/versions/3.9.0/lib/python3.9/site-packages/errbot/backends/base.py", line 861, in serve_forever
    if self.serve_once():
  File "/Users/dhanesh/dhanu/2022/devopsbot/backend/err-backend-slackv3/slackv3.py", line 273, in serve_once
    self.bot_identifier = SlackPerson(self.slack_web, self.auth["user_id"])
  File "/Users/dhanesh/dhanu/2022/devopsbot/backend/err-backend-slackv3/_slack/person.py", line 50, in __init__
    self._cache_user_info()
  File "/Users/dhanesh/dhanu/2022/devopsbot/backend/err-backend-slackv3/_slack/person.py", line 88, in _cache_user_info
    res = self._webclient.users_info(user=self._userid)
  File "/Users/dhanesh/.pyenv/versions/3.9.0/lib/python3.9/site-packages/slack_sdk/web/client.py", line 4192, in users_info
    return self.api_call("users.info", http_verb="GET", params=kwargs)
  File "/Users/dhanesh/.pyenv/versions/3.9.0/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 145, in api_call
    return self._sync_send(api_url=api_url, req_args=req_args)
  File "/Users/dhanesh/.pyenv/versions/3.9.0/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 182, in _sync_send
    return self._urllib_api_call(
  File "/Users/dhanesh/.pyenv/versions/3.9.0/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 316, in _urllib_api_call
    return SlackResponse(
  File "/Users/dhanesh/.pyenv/versions/3.9.0/lib/python3.9/site-packages/slack_sdk/web/slack_response.py", line 205, in validate
    raise e.SlackApiError(message=msg, response=self)
slack_sdk.errors.SlackApiError: The request to the Slack API failed. (url: https://www.slack.com/api/users.info)
The server responded with: {'ok': False, 'error': 'missing_scope', 'needed': 'users:read', 'provided': 'chat:write,im:write'}
K Dhanesh
@dhanupreeth_twitter
I have updated missing_scope.
K Dhanesh
@dhanupreeth_twitter
@nzlosh I have fixed it for mac.
its working
thanks for your help.
Carlos
@nzlosh
Nice to hear!
Eric Berg
@bergbrains

I'm a little stuck trying to figure out how to configure errbot to load modules on start-up. Can anybody point me in the right direction? I'm aware of the tools/plugin-gen.py script, but that appears to only create repos.json with public plugins.

I was deploying the plug-in with the container, but decoupled them, so the mod is loaded dynamically. Just trying to get it to load automatically on start up.

Thanks!

Sijis Aviles
@sijis
@bergbrains you need to put the python/plugin code inside the plugins directory path defined in your config.py file
1 reply
There is a cli option that can create a bare plugin for you. I don't remember offhand but it's osmething like errbot --new-plugin
As long as that code is in that plugin path when errbot bootsup it'll detect it and load it.
Mark Sullivan
@marksull
You have two options: 1) Your docker entrypoint script should pull the module into the plug-in directory within the container prior to your script starting errbot or 2) install the module in a persistent volume outside the docker container which is then mapped to the plug-in directory. In both these cases errbot will see the plug-in and load it.
1 reply
alpinweis
@alpinweis
Hi. Is it possible to have command aliases?
e.g. I have a command like pagerduty_status and I'd like to have a short alias like pd_status for it.
What's the recommended way to do it?
Sijis Aviles
@sijis
@alpinweis there is an alias plugin that should do that already.
I've also created a stub method in the past too.
alpinweis
@alpinweis
@sijis what do you mean by a stub method? do you have examples?
alpinweis
@alpinweis
also, when using the Alias plugin, what's the right way to add aliases during startup? I assume it's probably via running a specific errbot cli in my Dockerfile?
Sijis Aviles
@sijis
For stub method, basically I just created a new method that called the existing one (hard to type on phone, but something like)..

def myoldcmd(..): pass
def newcmd(...): self.myoldcmd(...)
I haven't used that plugin ina while, but if I recall it's stored in the backend (by default a $pluginname.db file). So upon startup the plugin is loaded and the commands should be available
Sijis Aviles
@sijis
If in docker/kube, you may want to use an external backend so that info is stored in a db and not local files
alpinweis
@alpinweis

In my case the long command name has to accept args/options, so the short alias (or the stub method) needs to be declared so that it can accept those options too.
e.g. this is how I imagine I'd define a stub:


    @arg_botcmd("-u", "--user", type=str, help=user name")
    @arg_botcmd("-p", "--project", type=str, help="project name")
    def pagerduty_status(self, msg, project=None, user=None):
      ......


    @arg_botcmd("-u", "--user", type=str, help=user name")
    @arg_botcmd("-p", "--project", type=str, help="project name")
    def pd_status(self, msg, project=None, user=None):
      self._bot._execute_and_send(cmd="pagerduty_status", args=...)

which looks like a lot of duplication.
From a quick view at the Alias plugin I'm not sure the !alias command supports flags with arbitrary values.

I tried something like

   pd_status = pagerduty_status

but that did not seem to work.

Sijis Aviles
@sijis
Ya. My cases were much simpler.
sijis
@sijis:matrix.org
[m]
Testing, under Matrix
Joseph Walton-Rivers
@webpigeon:fossgalaxy.com
[m]
Hi from matrix o/
sijis
@sijis:matrix.org
[m]
Joseph Walton-Rivers
@webpigeon:fossgalaxy.com
[m]
https://git.fossgalaxy.com/irc/errbot/backend-matrix is a matrix backend if you need it, mostly works :)
sijis
@sijis:matrix.org
[m]
Thanks. I'm trying to simplify my phone messaging apps
sijis
@sijis:matrix.org
[m]
Joseph Walton-Rivers: that's cool. I'm glad to see teams still using errbot :)
sijis
@sijis:matrix.org
[m]
I just released errbot version 6.1.9!
Versions are on pypi.org and dockerhub.
Carlos
@nzlosh
:clap: :thumbsup:
sijis
@sijis:matrix.org
[m]
Next release, is to focus on slack. Removing what's there and including the v3 version. :)
fernand0
@fernand0_twitter
Thansk for the new release!
I'm not sure about how to report this but in page: https://pypi.org/project/errbot/6.1.9/ the link in 'supports markdown extras formatting' (https://pythonhosted.org/Markdown/extensions/extra.html) seems to be not woking.
fernand0
@fernand0_twitter
fernand0
@fernand0_twitter
I've found it in the README of the project, I've suggested a change via PR.
sijis
@sijis:matrix.org
[m]
Pypi previously supported the syntax in the readme. That's new then. Thanks. I'll take a look at it
Carlos
@nzlosh

I'm in favour of keeping slackv3 outside of the errbot core repo so the backend developers can remain autonomous and apply fixes/features on different release cycles to the core.

If we must merge slackv3 for other reasons, I'd like to see the other backends merge into the core also for consistency sake, at least mattermost and discord (gitter perhaps).

A couple of other backends that'd be good to have in the errbot.io organisation would be MSTeam, Matrix and Keybase (I'm not sure if such a backend would fit with Errbot's architecture).

sijis
@sijis:matrix.org
[m]
I'm keeping it out of the main repo. My intent is to include in docker file and update documentarion
sijis
@sijis:matrix.org
[m]
And remove the existing slack that are already in the repo