marksull / err-backend-cisco-webex-teams

Err Backend for Cisco Webex Teams
MIT License
23 stars 6 forks source link

404 Not found exception #33

Closed fayazsk25 closed 3 years ago

fayazsk25 commented 3 years ago

I followed your Readme and tried to explore it. But when I am getting 404 exceptions in ERRbot when giving messages from Webex teams. Did I miss anything ???

https://webexapis.com:443 "GET /v1/messages/431a0d60-e21a-11eb-9511-5b8abb786e7f HTTP/1.1" 404 141 00:33:19 ERROR asyncio Future exception was never retrieved future: <Future finished exception=<ApiError [404] Not Found>> Traceback (most recent call last): File "/Users/fayshaik/opt/anaconda3/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, self.kwargs) File "/Users/fayshaik/errbot-root/err-backend-cisco-webex-teams/CiscoWebexTeams.py", line 491, in process_websocket new_message = self.webex_teams_api.messages.get(activity['id']) File "/Users/fayshaik/opt/anaconda3/lib/python3.8/site-packages/webexteamssdk/api/messages.py", line 321, in get json_data = self._session.get(API_ENDPOINT + '/' + messageId) File "/Users/fayshaik/opt/anaconda3/lib/python3.8/site-packages/webexteamssdk/restsession.py", line 380, in get response = self.request("GET", url, erc, params=params, kwargs) File "/Users/fayshaik/opt/anaconda3/lib/python3.8/site-packages/webexteamssdk/restsession.py", line 345, in request check_response_code(response, erc) File "/Users/fayshaik/opt/anaconda3/lib/python3.8/site-packages/webexteamssdk/utils.py", line 222, in check_response_code raise ApiError(response) webexteamssdk.exceptions.ApiError: [404] Not Found - Unable to get message. [Tracking ID: ROUTER_60EA9E9C-E99E-01BB-4F8C-0AFE0B8F4F8C]

marksull commented 3 years ago

Did I miss anything ???

Hard to tell with the limited information. Did you set the BOT_IDENTITY correctly?

Maybe a pip freeze and the output of your config.py would help (mask your BOT ID or any passwords)

fayazsk25 commented 3 years ago

Here is the output for pip freeze and config.py

alabaster==0.7.12 anaconda-client==1.7.2 anaconda-navigator==1.10.0 anaconda-project==0.8.3 ansi==0.2.0 applaunchservices==0.2.1 appnope @ file:///opt/concourse/worker/volumes/live/0291c9e1-4b15-459f-623e-2770f55be269/volume/appnope_1594338395037/work appscript @ file:///opt/concourse/worker/volumes/live/50ca4c96-3090-40bb-6981-3a6114ed0af4/volume/appscript_1594840187551/work argh==0.26.2 argon2-cffi @ file:///opt/concourse/worker/volumes/live/59af29ac-4890-416e-7ab7-794f8d6f7ecd/volume/argon2-cffi_1596828548321/work asn1crypto @ file:///tmp/build/80754af9/asn1crypto_1596577642040/work astroid @ file:///opt/concourse/worker/volumes/live/21fd14a9-2a7e-484b-7394-5a9912cdcf80/volume/astroid_1592498459180/work astropy==4.0.2 async-generator==1.10 atomicwrites==1.4.0 attrs @ file:///tmp/build/80754af9/attrs_1604765588209/work autopep8 @ file:///tmp/build/80754af9/autopep8_1596578164842/work awscli==1.19.33 Babel @ file:///tmp/build/80754af9/babel_1605108370292/work backcall==0.2.0 backports.functools-lru-cache==1.6.1 backports.shutil-get-terminal-size==1.0.0 backports.tempfile==1.0 backports.weakref==1.0.post1 bcrypt==3.2.0 beautifulsoup4 @ file:///tmp/build/80754af9/beautifulsoup4_1601924105527/work bitarray @ file:///opt/concourse/worker/volumes/live/fdfca23e-4dd8-48f7-512d-c4f3db552eeb/volume/bitarray_1605065128338/work bkcharts==0.2 bleach @ file:///tmp/build/80754af9/bleach_1600439572647/work bokeh @ file:///opt/concourse/worker/volumes/live/b2253281-9b72-4dcb-624e-e22924b50435/volume/bokeh_1603297849453/work boto==2.49.0 boto3==1.17.33 botocore==1.20.33 Bottleneck==1.3.2 brotlipy==0.7.0 certifi==2020.6.20 cffi @ file:///opt/concourse/worker/volumes/live/b9607b09-b777-4ff7-53dc-287727eb8574/volume/cffi_1600699191154/work chardet==3.0.4 click==7.1.2 cloudpickle @ file:///tmp/build/80754af9/cloudpickle_1598884132938/work clyent==1.2.2 colorama==0.4.3 colorlog==5.0.1 conda==4.9.2 conda-build==3.20.5 conda-package-handling @ file:///opt/concourse/worker/volumes/live/a7e34989-4c54-4cb6-4156-4e58ee270730/volume/conda-package-handling_1603018121300/work conda-verify==3.4.2 contextlib2==0.6.0.post1 cryptography @ file:///opt/concourse/worker/volumes/live/aeb63a26-659e-4edb-5405-74ba8e0c76f2/volume/cryptography_1601046839724/work cycler==0.10.0 Cython @ file:///opt/concourse/worker/volumes/live/6158b663-a4ca-4e19-7e05-8807e4f79146/volume/cython_1594835048880/work cytoolz==0.11.0 daemonize==2.5.0 dask @ file:///tmp/build/80754af9/dask-core_1602083700509/work decorator==4.4.2 deepmerge==0.3.0 defusedxml==0.6.0 diff-match-patch @ file:///tmp/build/80754af9/diff-match-patch_1594828741838/work distributed @ file:///opt/concourse/worker/volumes/live/bd66aa48-5cf5-4b60-6ed4-f204fff153f6/volume/distributed_1605066538557/work dnspython==2.1.0 docutils==0.15.2 dulwich==0.20.23 entrypoints==0.3 errbot==6.1.8 et-xmlfile==1.0.1 fastcache==1.1.0 filelock==3.0.12 flake8 @ file:///tmp/build/80754af9/flake8_1601911421857/work Flask==1.1.2 fsspec @ file:///tmp/build/80754af9/fsspec_1602684995936/work future==0.18.2 gevent @ file:///opt/concourse/worker/volumes/live/e6b243ce-c4b8-40bb-4934-ef3bf1c512f2/volume/gevent_1601397552921/work glob2==0.7 gmpy2==2.0.8 greenlet @ file:///opt/concourse/worker/volumes/live/02d5d57d-1f11-4cf9-580a-19e679c78dc9/volume/greenlet_1600874049903/work h5py==2.10.0 HeapDict==1.0.1 html5lib @ file:///tmp/build/80754af9/html5lib_1593446221756/work idna @ file:///tmp/build/80754af9/idna_1593446292537/work imageio @ file:///tmp/build/80754af9/imageio_1594161405741/work imagesize==1.2.0 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1602276842396/work iniconfig @ file:///tmp/build/80754af9/iniconfig_1602780191262/work intervaltree @ file:///tmp/build/80754af9/intervaltree_1598376443606/work ipykernel @ file:///opt/concourse/worker/volumes/live/88f541d3-5a27-498f-7391-f2e50ca36560/volume/ipykernel_1596206680118/work/dist/ipykernel-5.3.4-py3-none-any.whl ipython @ file:///opt/concourse/worker/volumes/live/26969e8f-c9f7-42dc-6ffb-b3effd424c49/volume/ipython_1604101242376/work ipython-genutils==0.2.0 ipywidgets @ file:///tmp/build/80754af9/ipywidgets_1601490159889/work isort @ file:///tmp/build/80754af9/isort_1602603989581/work itsdangerous==1.1.0 jdcal==1.4.1 jedi @ file:///opt/concourse/worker/volumes/live/1c5c293b-9147-4b4b-5a7f-d3f5eddb8470/volume/jedi_1592841952519/work Jinja2==2.11.2 jmespath==0.10.0 joblib @ file:///tmp/build/80754af9/joblib_1601912903842/work json5==0.9.5 jsonschema @ file:///tmp/build/80754af9/jsonschema_1602607155483/work jupyter==1.0.0 jupyter-client @ file:///tmp/build/80754af9/jupyter_client_1601311786391/work jupyter-console @ file:///tmp/build/80754af9/jupyter_console_1598884538475/work jupyter-core==4.6.3 jupyterlab==2.2.6 jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work jupyterlab-server @ file:///tmp/build/80754af9/jupyterlab_server_1594164409481/work keyring @ file:///opt/concourse/worker/volumes/live/54fc3ec2-338b-44f5-5e13-d62afa6b5820/volume/keyring_1601490916376/work kiwisolver @ file:///opt/concourse/worker/volumes/live/b8936fa6-0e4b-47e7-4fb4-e02dbd4505ee/volume/kiwisolver_1604014598721/work lazy-object-proxy==1.4.3 libarchive-c==2.9 llvmlite==0.34.0 locket==0.2.0 lxml @ file:///opt/concourse/worker/volumes/live/9351a723-931c-40fa-7baa-f2f468cdccf6/volume/lxml_1603216287330/work Markdown==3.3.4 MarkupSafe @ file:///opt/concourse/worker/volumes/live/cb778296-98db-45ad-411e-6f726e102dc3/volume/markupsafe_1594371638608/work matplotlib @ file:///opt/concourse/worker/volumes/live/f7797860-f8aa-410c-4a56-72315954816b/volume/matplotlib-base_1603378002957/work mccabe==0.6.1 mistune @ file:///opt/concourse/worker/volumes/live/95802d64-d39c-491b-74ce-b9326880ca54/volume/mistune_1594373201816/work mkl-fft==1.2.0 mkl-random==1.1.1 mkl-service==2.3.0 mock==4.0.2 more-itertools @ file:///tmp/build/80754af9/more-itertools_1605111547926/work mpmath==1.1.0 msgpack==1.0.0 multipledispatch==0.6.0 navigator-updater==0.2.1 nbclient @ file:///tmp/build/80754af9/nbclient_1602783176460/work nbconvert @ file:///opt/concourse/worker/volumes/live/2b9c1d93-d0fd-432f-7d93-66c93d81b614/volume/nbconvert_1601914875037/work nbformat @ file:///tmp/build/80754af9/nbformat_1602783287752/work nest-asyncio @ file:///tmp/build/80754af9/nest-asyncio_1605115881283/work networkx @ file:///tmp/build/80754af9/networkx_1598376031484/work nltk @ file:///tmp/build/80754af9/nltk_1592496090529/work nose @ file:///opt/concourse/worker/volumes/live/a029938e-1732-4cd8-5b98-0542283d158b/volume/nose_1594377915100/work notebook @ file:///opt/concourse/worker/volumes/live/be0f3504-189d-4bae-4e57-c5d6da73ffcd/volume/notebook_1601501605350/work nslookup==1.2.0 numba @ file:///opt/concourse/worker/volumes/live/ae24c1ca-d916-4043-5919-a843fa33e451/volume/numba_1600084276085/work numexpr==2.7.1 numpy @ file:///opt/concourse/worker/volumes/live/5572694e-967a-4c0c-52cf-b53d43e72de9/volume/numpy_and_numpy_base_1603491881791/work numpydoc @ file:///tmp/build/80754af9/numpydoc_1605117425582/work olefile==0.46 openpyxl @ file:///tmp/build/80754af9/openpyxl_1598113097404/work packaging==20.4 pandas @ file:///opt/concourse/worker/volumes/live/f14cf8c4-c564-4eff-4b17-158e90dbf88a/volume/pandas_1602088128240/work pandocfilters @ file:///opt/concourse/worker/volumes/live/c330e404-216d-466b-5327-8ce8fe854d3a/volume/pandocfilters_1605120442288/work paramiko==2.7.2 parso==0.7.0 partd==1.1.0 path @ file:///opt/concourse/worker/volumes/live/fcdf620c-46d6-4284-4c1e-5b8c3bc6c5c6/volume/path_1596907417277/work pathlib2 @ file:///opt/concourse/worker/volumes/live/de518564-0d9f-405e-472b-38136f0c2169/volume/pathlib2_1594381084269/work pathtools==0.1.2 patsy==0.5.1 pep8==1.7.1 pexpect @ file:///opt/concourse/worker/volumes/live/8701bb20-ad87-46c7-5108-30c178cf97e5/volume/pexpect_1594383388344/work pickleshare @ file:///opt/concourse/worker/volumes/live/93ec39d8-05bb-4f84-7efc-98735bc39b70/volume/pickleshare_1594384101884/work Pillow @ file:///opt/concourse/worker/volumes/live/991b9a87-3372-4acd-45f9-eaa52701f03c/volume/pillow_1603822262543/work pkginfo==1.6.1 pluggy==0.13.1 ply==3.11 prometheus-client==0.8.0 prompt-toolkit @ file:///tmp/build/80754af9/prompt-toolkit_1602688806899/work psutil @ file:///opt/concourse/worker/volumes/live/ff72f822-991c-4030-4f3a-8c41d3ac4e4f/volume/psutil_1598370232375/work ptyprocess==0.6.0 py @ file:///tmp/build/80754af9/py_1593446248552/work pyasn1==0.4.8 pycodestyle==2.6.0 pycosat==0.6.3 pycparser @ file:///tmp/build/80754af9/pycparser_1594388511720/work pycurl==7.43.0.6 pydocstyle @ file:///tmp/build/80754af9/pydocstyle_1598885001695/work pyflakes==2.2.0 Pygments @ file:///tmp/build/80754af9/pygments_1604103097372/work pygments-markdown-lexer==0.1.0.dev39 PyJWT==2.1.0 pylint @ file:///opt/concourse/worker/volumes/live/ed0164b6-bcc7-4f6b-7dd4-ad89660b5dcb/volume/pylint_1598624018129/work PyNaCl==1.4.0 pyodbc===4.0.0-unsupported pyOpenSSL @ file:///tmp/build/80754af9/pyopenssl_1594392929924/work pyparsing==2.4.7 pyrsistent @ file:///opt/concourse/worker/volumes/live/ff11f3f0-615b-4508-471d-4d9f19fa6657/volume/pyrsistent_1600141727281/work PySocks @ file:///opt/concourse/worker/volumes/live/85a5b906-0e08-41d9-6f59-084cee4e9492/volume/pysocks_1594394636991/work pytest==0.0.0 python-dateutil==2.8.1 python-jsonrpc-server @ file:///tmp/build/80754af9/python-jsonrpc-server_1600278539111/work python-language-server @ file:///tmp/build/80754af9/python-language-server_1600454544709/work pytz==2020.1 PyWavelets @ file:///opt/concourse/worker/volumes/live/ea36e10f-66e8-43ae-511e-c4092764493f/volume/pywavelets_1601658378672/work PyYAML==5.3.1 pyzmq==19.0.2 QDarkStyle==2.8.1 QtAwesome @ file:///tmp/build/80754af9/qtawesome_1602272867890/work qtconsole @ file:///tmp/build/80754af9/qtconsole_1600870028330/work QtPy==1.9.0 regex @ file:///opt/concourse/worker/volumes/live/7f106f75-0e11-45be-4c20-6b071e37c646/volume/regex_1602786678165/work requests @ file:///tmp/build/80754af9/requests_1592841827918/work requests-toolbelt==0.9.1 rope @ file:///tmp/build/80754af9/rope_1602264064449/work rsa==4.5 Rtree==0.9.4 ruamel-yaml==0.15.87 s3transfer==0.3.6 scikit-image==0.17.2 scikit-learn @ file:///opt/concourse/worker/volumes/live/111833a2-339b-4578-413b-7337bb8fe64a/volume/scikit-learn_1598376920601/work scipy @ file:///opt/concourse/worker/volumes/live/851446f6-a052-41c4-4243-67bb78999b49/volume/scipy_1604596178167/work seaborn @ file:///tmp/build/80754af9/seaborn_1600553570093/work Send2Trash==1.5.0 simplegeneric==0.8.1 singledispatch @ file:///tmp/build/80754af9/singledispatch_1602523705405/work six @ file:///opt/concourse/worker/volumes/live/5b31cb27-1e37-4ca5-6e9f-86246eb206d2/volume/six_1605205320872/work snowballstemmer==2.0.0 sortedcollections==1.2.1 sortedcontainers==2.2.2 soupsieve==2.0.1 Sphinx @ file:///tmp/build/80754af9/sphinx_1597428793432/work sphinxcontrib-applehelp==1.0.2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==1.0.3 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.4 sphinxcontrib-websupport @ file:///tmp/build/80754af9/sphinxcontrib-websupport_1597081412696/work spyder @ file:///opt/concourse/worker/volumes/live/93f52c11-6bc0-49a8-541e-aa5e1de1eadc/volume/spyder_1599056974853/work spyder-kernels @ file:///opt/concourse/worker/volumes/live/b4ec5b57-5b3c-42d0-7731-c0691f88ee81/volume/spyder-kernels_1599056790993/work SQLAlchemy @ file:///opt/concourse/worker/volumes/live/0214475e-3c0a-49a9-6cb8-ab2d5c945bef/volume/sqlalchemy_1603812264100/work statsmodels @ file:///opt/concourse/worker/volumes/live/148a0e6d-2163-4103-6ef5-61556693c052/volume/statsmodels_1602280229372/work sympy @ file:///opt/concourse/worker/volumes/live/d5d0b33b-5c2f-493b-5b67-8149e5531868/volume/sympy_1605119535834/work tables==3.6.1 tblib @ file:///tmp/build/80754af9/tblib_1597928476713/work terminado==0.9.1 testpath==0.4.4 threadpoolctl @ file:///tmp/tmp9twdgx9k/threadpoolctl-2.1.0-py3-none-any.whl tifffile==2020.10.1 toml @ file:///tmp/build/80754af9/toml_1592853716807/work toolz @ file:///tmp/build/80754af9/toolz_1601054250827/work tornado==6.0.4 tqdm @ file:///tmp/build/80754af9/tqdm_1602185206534/work traitlets @ file:///tmp/build/80754af9/traitlets_1602787416690/work typing-extensions @ file:///tmp/build/80754af9/typing_extensions_1598376058250/work ujson @ file:///opt/concourse/worker/volumes/live/2fc9988c-ebca-4577-6c4b-7383ea76e8ee/volume/ujson_1602523306974/work unicodecsv==0.14.1 urllib3 @ file:///tmp/build/80754af9/urllib3_1603305693037/work waitress==2.0.0 watchdog @ file:///opt/concourse/worker/volumes/live/cc0ee7bb-1065-44c4-5867-0fd5d13729e0/volume/watchdog_1593447373245/work wcwidth @ file:///tmp/build/80754af9/wcwidth_1593447189090/work webencodings==0.5.1 webexteamssdk==1.6 WebOb==1.8.7 websockets==9.1 WebTest==2.0.35 Werkzeug==1.0.1 widgetsnbextension==3.5.1 wrapt==1.11.2 wurlitzer @ file:///opt/concourse/worker/volumes/live/01a17f3d-eafe-4806-57a1-4b9ef5d1815f/volume/wurlitzer_1594753845129/work xlrd==1.2.0 XlsxWriter @ file:///tmp/build/80754af9/xlsxwriter_1602692860603/work xlwings==0.20.8 xlwt==1.3.0 xmltodict==0.12.0 yapf @ file:///tmp/build/80754af9/yapf_1593528177422/work zict==2.0.0 zipp @ file:///tmp/build/80754af9/zipp_1604001098328/work zope.event==4.5.0 zope.interface @ file:///opt/concourse/worker/volumes/live/de428e3b-00ba-4161-442e-b9e5d25e4219/volume/zope.interface_1602002489816/work

==========

import logging

This is a minimal configuration to get you started with the Text mode.

If you want to connect Errbot to chat services, checkout

the options in the more complete config-template.py from here:

https://raw.githubusercontent.com/errbotio/errbot/master/errbot/config-template.py

BACKEND = 'Text' # Errbot will start in text mode (console only mode) and will answer commands from there.

BACKEND = 'CiscoWebexTeams' # Errbot will start in text mode (console only mode) and will answer commands from there. BOT_EXTRA_BACKEND_DIR = r'/Users//errbot-root/plugins/err-backend-cisco-webex-teams'

BOT_DATA_DIR = r'/Users//errbot-root/data' BOT_EXTRA_PLUGIN_DIR = r'/Users//errbot-root/plugins'

BOT_PREFIX = r'' #I have removed the bot name

BOT_IDENTITY = { 'TOKEN' : '<removed bot identity token for security purpose', }

BOT_LOG_FILE = r'/Users//errbot-root/errbot.log' BOT_LOG_LEVEL = logging.DEBUG BOT_PREFIX_OPTIONAL_ON_CHAT = True SUPPRESS_CMD_NOT_FOUND = True

BOT_ADMINS = ('username>@<domain.com', ) # !! Don't leave that to "@CHANGE_ME" if you connect your errbot to a chat system !! ~

marksull commented 3 years ago

You haven't set your BOT_ADMINS correctly?

BOT_ADMINS = ('@.com', ) # !! Don't leave that to "@CHANGE_ME" if you connect your errbot to a chat system !!

How is the bot to determine if you are an admin if you don't have your correct userid?

marksull commented 3 years ago

@fayazsk25 This should be resolved in the latest version of this plugin 1.10.0

https://github.com/marksull/err-backend-cisco-webex-teams/pull/34

fayazsk25 commented 3 years ago

Thanks for the update