Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Carlos
@nzlosh
Great news! Thanks for sorting that out.
Carlos
@nzlosh
@sijis Would you be for or against errbot-backend-mattermost project being renamed to err-backend-mattermost for consistency sake? The only other backend that uses errbot rather than err is errbot-backend-skype but I think it's deprecated now.
Yamila Moreno
@yamila-moreno
Hi there, I'm struggling with the flow example. I cannot get it running. I'm using telegram backend.
  • where should the flows go? in the plugins directory? in a flows directory? (I've tried both, but not sure)
  • the .flow file should be called myflows.flow like the myflows.py file?
Sijis Aviles
@sijis
@yamila-moreno The layout should be as a normal plugin. Inside the plugins directory.
@nzlosh I can rename it. Not a problem
Carlos
@nzlosh
Thanks @sijis :thumbsup: it'll make it easier for people find/install the backends if they all follow the same naming convention.
Apache-QiBao
@skisqibao
How to integrate the errbot into the web chat tool developed by springboot ?
Sijis Aviles
@sijis
@skisqibao could you elaborate a little on what you are trying to do?
Apache-QiBao
@skisqibao
@sijis Now I have a springboot project, there is a page with a chat function, I want to integrate the errbot into this page
Sijis Aviles
@sijis
@skisqibao I'm guessing that's a custom chat system? If that's the case, you'd have to create a custom backend for your system. If it's xmpp based you could look at the existing xmpp one as a starting point.
Alternative, if you just want to send commands to the bot, you can create a webhook plugin and interact with it that way. But that's just typical API methodology.
Sijis Aviles
@sijis
@nzlosh i just archived the skype backend (errbotio/err-backend-skype). it only supports 2.7, which errbot no longer supports.
Apache-QiBao
@skisqibao
Thanks @sijis
I think I have a general idea.
Carlos
@nzlosh
Thanks for sorting that out. Does skype still exist?
Sijis Aviles
@sijis
maybe, but the library is for py 2.7 and hasn't been touched in 9 yrs. the backend in 6.
Carlos
@nzlosh
I seem to recall Skype being bought my Microsoft and being transformed into teams, but I could be wrong, I don't keep track of Microsoft products.
Stefano Ortolani
@ostefano
@nzlosh does the errbot slackv3 backend supports the bot replying with an image rather than text?
Carlos
@nzlosh
I've never tried personally. There's a method _slack_upload which calls Slack's files_upload API. If the backend doesn't support the method directly, the SlackSDK module is avilable through the backend object as slack_web. There's a method called api_call which was carried forward from the original slack backend that calls SlackSDK's api_call method. It's a thin wrapper giving access to calling the Slack API directly. That might be another way of getting to the functionality you need.
jv-kalyanchakravarthy
@jv-kalyanchakravarthy

Hai,

I'm facing the problem on my errbot recently, which is running fine from quite long time. We haven't done any changes in the recent time, all of sudden it started failing.

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/errbot/backends/base.py", line 861, in serve_forever
if self.serve_once():
File "backends/err-backend-slackv3/slackv3.py", line 256, in serve_once
self.auth = self.slack_web.auth_test()
File "/usr/local/lib/python3.9/site-packages/slack_sdk/web/client.py", line 1512, in auth_test
return self.api_call("auth.test", params=kwargs)
File "/usr/local/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 "/usr/local/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 182, in _sync_send
return self._urllib_api_call(
File "/usr/local/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 297, in _urllib_api_call
response = self._perform_urllib_http_request(url=url, args=request_args)
File "/usr/local/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 504, in _perform_urllib_http_request
raise err
File "/usr/local/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 412, in _perform_urllib_http_request
resp = self._perform_urllib_http_request_internal(url, req)
File "/usr/local/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 537, in _perform_urllib_http_request_internal
resp = urlopen( # skipcq: BAN-B310
File "/usr/local/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.9/urllib/request.py", line 517, in open
response = self._open(req, data)
File "/usr/local/lib/python3.9/urllib/request.py", line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/local/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.9/urllib/request.py", line 1389, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/local/lib/python3.9/urllib/request.py", line 1349, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Try again>
2022-03-11 20:51:22,049 INFO errbot.backends.base Reconnecting in 601 seconds (10 attempted reconnections so far).

2022-03-11 20:51:15,716 ERROR slack_sdk.web.base_client Failed to send a request to Slack API server: <urlopen error [Errno -3] Try again>
2022-03-11 20:51:15,716 INFO slack_sdk.web.base_client A retry handler found: ConnectionErrorRetryHandler for POST https://www.slack.com/api/auth.test - <urlopen error [Errno -3] Try again>
2022-03-11 20:51:17,024 INFO slack_sdk.web.base_client Going to retry the same request: POST https://www.slack.com/api/auth.test
2022-03-11 20:51:22,048 ERROR slack_sdk.web.base_client Failed to send a request to Slack API server: <urlopen error [Errno -3] Try again>
2022-03-11 20:51:22,048 ERROR errbot.backends.base Exception occurred in serve_once:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/urllib/request.py", line 1346, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/local/lib/python3.9/http/client.py", line 1285, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.9/http/client.py", line 1331, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.9/http/client.py", line 1280, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.9/http/client.py", line 1040, in _send_output
self.send(msg)
File "/usr/local/lib/python3.9/http/client.py", line 980, in send
self.connect()
File "/usr/local/lib/python3.9/http/client.py", line 1447, in connect
super().connect()
File "/usr/local/lib/python3.9/http/client.py", line 946, in connect
self.sock = self._create_connection(
File "/usr/local/lib/python3.9/socket.py", line 823, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/local/lib/python3.9/socket.py", line 954, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again
Has anyone faced the issue. Request to help on the issue.
Carlos
@nzlosh

@jv-kalyanchakravarthy According to the man pages for getaddrinfo, "Try again" relates to this error:

EAI_AGAIN
              The name server returned a temporary failure indication.  Try again later.

Which suggest you've got DNS issues in your infrastructure

jv-kalyanchakravarthy
@jv-kalyanchakravarthy
Thanks @nzlosh got the issue. Updated the DNS config and it's working.
YuchaoWanghh
@YuchaoWanghh
hello
Sijis Aviles
@sijis
Hi
@nzlosh I'm looking at a release in the next couple of weeks.
Carlos
@nzlosh
Sounds good :thumbsup:
DrHeckerKiller
@DrHeckerKiller
Hi
Can i have mod?
Plss
U w U
Hello?
Pls answer
Sijis Aviles
@sijis
What do I mean, mod?
lowid
@soloradish
Hi every one. I need some help in simple botcmd() use case.
how can I get user identitry who trigger the botcmd ?
I need read user email address from slack backend. I find there is identity.Person in slackv3 backend.
but I'm not able to figure out how to get or 'reflect' user identity in @botcmd decorated function.
Sijis Aviles
@sijis
If you type !whoami you should see the object path to get the info you need. It's be like frm.xxxx
lowid
@soloradish
@sijis thank you!
Sijis Aviles
@sijis
Glad that helped
lowid
@soloradish
I have another question, how should I handle the non-command message from users?
eg. user send text with out leading !, I want send help message back to user.
I found 'def unknown_command'. but this method only handle unmatched command, not plain messages.
how can I achieve this ?
lowid
@soloradish
I finally resolve it. use 'callback_message'. ; )
Carlos
@nzlosh
Sijis Aviles
@sijis
lowid
@soloradish
It's very helpful, thank you @nzlosh @sijis
Sijis Aviles
@sijis
@soloradish anytime. Glad to be of help