If you have a coding question, you can use stackoverflow with the tag 'errbot' and 'python'
sijis on master
Update README.md with new URL (… (compare)
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’].
@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'}
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!
errbot --new-plugin
def myoldcmd(..): pass
def newcmd(...): self.myoldcmd(...)
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.
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).