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

Package installation issues #1692

Open
Marcusg33 opened this issue May 9, 2024 · 0 comments
Open

Package installation issues #1692

Marcusg33 opened this issue May 9, 2024 · 0 comments

Comments

@Marcusg33
Copy link

Marcusg33 commented May 9, 2024

Hey everyone,
I would really appreciate some help with getting errbot to connect to a mattermost-preview server running locally

Issue description
I have a mattermost-preview server successfully running on a docker image with an account set up
I'm having trouble with cryptography and openssl.
I get this error when running errbot in the backend directory

11:32:32 ERROR    errbot.bootstrap          Some plugins failed to load:
from cryptography.hazmat.bindings._openssl import ffi, lib
ModuleNotFoundError: No module named '_cffi_backend

I fixed it prior somehow but not sure how I did it or how I undid it

PS C:\Users\marcu\Documents\2pi\LLMBot\err-backend-mattermost> errbot
11:32:32 INFO     errbot.bootstrap          Found Storage plugin: Shelf.
11:32:32 INFO     errbot.bootstrap          Found Backend plugin: Mattermost
11:32:32 DEBUG    errbot.storage            Opening storage 'repomgr'
11:32:32 DEBUG    errbot.storage.shelf      Open shelf storage C:\Users\marcu\Documents\2pi\LLMBot\err-backend-mattermost\data\repomgr.db
11:32:32 DEBUG    errbot.core               ErrBot init.
11:32:32 DEBUG    errbot.backends.base      Backend init.
11:32:32 DEBUG    errbot.core               created a thread pool of size 10.
11:32:32 DEBUG    errbot.storage            Opening storage 'core'
11:32:32 DEBUG    errbot.storage.shelf      Open shelf storage C:\Users\marcu\Documents\2pi\LLMBot\err-backend-mattermost\data\core.db
11:32:32 DEBUG    errbot.core               Initializing backend storage
11:32:32 DEBUG    errbot.storage            Opening storage 'mattermost_backend'
11:32:32 DEBUG    errbot.storage.shelf      Open shelf storage C:\Users\marcu\Documents\2pi\LLMBot\err-backend-mattermost\data\mattermost_backend.db
11:32:32 DEBUG    errbot.plugin_manager     New entries added to sys.path:
11:32:32 DEBUG    errbot.plugin_manager     C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\errbot\core_plugins
11:32:32 DEBUG    errbot.plugin_manager     C:\Users\marcu\Documents\2pi\LLMBot\err-backend-mattermost\plugins\err-example
11:32:32 DEBUG    errbot.plugins.ACLs       Logger for plugin ACLs initialized...
11:32:32 DEBUG    errbot.plugins.Backup     Logger for plugin Backup initialized...
11:32:32 DEBUG    errbot.plugins.ChatRoom   Logger for plugin ChatRoom initialized...
11:32:32 DEBUG    errbot.plugins.CommandNot Logger for plugin CommandNotFoundFilter initialized...
11:32:32 DEBUG    errbot.plugins.Flows      Logger for plugin Flows initialized...
11:32:32 DEBUG    errbot.plugins.Health     Logger for plugin Health initialized...
11:32:32 DEBUG    errbot.plugins.Help       Logger for plugin Help initialized...
11:32:32 DEBUG    errbot.plugins.Plugins    Logger for plugin Plugins initialized...
11:32:32 DEBUG    errbot.plugins.TextCmds   Logger for plugin TextCmds initialized...
11:32:32 DEBUG    errbot.plugins.Utils      Logger for plugin Utils initialized...
11:32:32 DEBUG    errbot.plugins.VersionChe Logger for plugin VersionChecker initialized...
11:32:32 DEBUG    errbot.plugins.Example    Logger for plugin Example initialized...
11:32:32 ERROR    errbot.bootstrap          Some plugins failed to load:
Traceback (most recent call last):
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\errbot\plugin_manager.py", line 289, in _load_plugins_generic
    plugin_classes = plugin_info.load_plugin_classes(
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\errbot\plugin_info.py", line 100, in load_plugin_classes
    spec.loader.exec_module(modu1e)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\errbot\core_plugins\webserver.py", line 9, in <module>
    from OpenSSL import crypto
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\OpenSSL\__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\OpenSSL\crypto.py", line 16, in <module>
    from OpenSSL._util import (
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\OpenSSL\_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py", line 14, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ModuleNotFoundError: No module named '_cffi_backend'

11:32:32 DEBUG    errbot.bootstrap          Start serving commands from the mattermost backend.
11:32:32 DEBUG    urllib3.connectionpool    Starting new HTTP connection (1): localhost:8065
11:32:32 DEBUG    urllib3.connectionpool    http://localhost:8065 "POST /api/v4/users/login HTTP/1.1" 200 707
11:32:32 DEBUG    urllib3.connectionpool    Starting new HTTP connection (1): localhost:8065
11:32:32 DEBUG    urllib3.connectionpool    http://localhost:8065 "GET /api/v4/teams/name/George%20testing HTTP/1.1" 404 270
11:32:32 ERROR    mattermostdriver.websocke Sorry, we could not find the page.
11:32:32 ERROR    errbot.backends.base      Exception occurred in serve_once:
Traceback (most recent call last):
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\errbot\backends\base.py", line 869, in serve_forever
    if self.serve_once():
  File "C:\Users\marcu\Documents\2pi\LLMBot\err-backend-mattermost\src\err-backend-mattermost\err-backend-mattermost.py", line 347, in serve_once
    self.teamid = self.driver.teams.get_team_by_name(name=self.team)["id"]
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\mattermostdriver\endpoints\teams.py", line 46, in get_team_by_name
    return self.client.get(
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\mattermostdriver\client.py", line 193, in get     
    response = self.make_request('get', endpoint, options=options, params=params)
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\mattermostdriver\client.py", line 179, in make_request
    raise ResourceNotFound(message,self._basepath) from None
mattermostdriver.exceptions.ResourceNotFound: [Errno Sorry, we could not find the page.] /api/v4
11:32:32 INFO     errbot.backends.base      Reconnecting in 1 seconds (0 attempted reconnections so far).
11:32:33 DEBUG    urllib3.connectionpool    Starting new HTTP connection (1): localhost:8065
11:32:33 DEBUG    urllib3.connectionpool    http://localhost:8065 "POST /api/v4/users/login HTTP/1.1" 200 707
11:32:33 DEBUG    urllib3.connectionpool    Starting new HTTP connection (1): localhost:8065
11:32:33 DEBUG    urllib3.connectionpool    http://localhost:8065 "GET /api/v4/teams/name/George%20testing HTTP/1.1" 404 270
11:32:33 ERROR    mattermostdriver.websocke Sorry, we could not find the page.
11:32:33 ERROR    errbot.backends.base      Exception occurred in serve_once:
Traceback (most recent call last):
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\errbot\backends\base.py", line 869, in serve_forever
    if self.serve_once():
  File "C:\Users\marcu\Documents\2pi\LLMBot\err-backend-mattermost\src\err-backend-mattermost\err-backend-mattermost.py", line 347, in serve_once
    self.teamid = self.driver.teams.get_team_by_name(name=self.team)["id"]
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\mattermostdriver\endpoints\teams.py", line 46, in get_team_by_name
    return self.client.get(
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\mattermostdriver\client.py", line 193, in get     
    response = self.make_request('get', endpoint, options=options, params=params)
  File "C:\Users\marcu\.conda\envs\errbot-backend\lib\site-packages\mattermostdriver\client.py", line 179, in make_request
    raise ResourceNotFound(message,self._basepath) from None
mattermostdriver.exceptions.ResourceNotFound: [Errno Sorry, we could not find the page.] /api/v4

Steps to reproduce

Here's the packages installed on the errbot conda environment

# packages in environment at C:\Users\marcu\.conda\envs\errbot-backend:
#
# Name                    Version                   Build  Channel
ansi                      0.3.6                    pypi_0    pypi
asyncio                   3.4.3                    pypi_0    pypi
autopep8                  2.1.0                    pypi_0    pypi
beautifulsoup4            4.12.3                   pypi_0    pypi
blinker                   1.8.1                    pypi_0    pypi
bzip2                     1.0.8                h2bbff1b_6
ca-certificates           2024.3.11            haa95532_0
certifi                   2024.2.2                 pypi_0    pypi
cffi                      1.16.0                   pypi_0    pypi
charset-normalizer        3.3.2                    pypi_0    pypi
click                     8.1.7                    pypi_0    pypi
colorama                  0.4.6                    pypi_0    pypi
colorlog                  6.7.0                    pypi_0    pypi
cryptography              38.0.4                   pypi_0    pypi
deepmerge                 1.1.0                    pypi_0    pypi
distlib                   0.3.8                    pypi_0    pypi
dulwich                   0.21.5                   pypi_0    pypi
errbot                    6.2.0                    pypi_0    pypi
expat                     2.6.2                hd77b12b_0
filelock                  3.14.0                   pypi_0    pypi
flask                     2.3.3                    pypi_0    pypi
idna                      3.7                      pypi_0    pypi
importlib-metadata        7.1.0                    pypi_0    pypi
itsdangerous              2.2.0                    pypi_0    pypi
jinja2                    3.1.2                    pypi_0    pypi
libffi                    3.4.4                hd77b12b_1
markdown                  3.4.4                    pypi_0    pypi
markupsafe                2.1.5                    pypi_0    pypi
mattermost                6.5.0                    pypi_0    pypi
mattermostdriver          7.3.2                    pypi_0    pypi
openssl                   3.0.13               h2bbff1b_1
pip                       23.3.1          py310haa95532_0
platformdirs              4.2.1                    pypi_0    pypi
pycodestyle               2.11.1                   pypi_0    pypi
pycparser                 2.22                     pypi_0    pypi
pygments                  2.16.1                   pypi_0    pypi
pygments-markdown-lexer   0.1.0.dev39              pypi_0    pypi
pyopenssl                 19.0.0                   pypi_0    pypi
python                    3.10.14              he1021f5_0
requests                  2.31.0                   pypi_0    pypi
setuptools                68.1.2                   pypi_0    pypi
six                       1.16.0                   pypi_0    pypi
soupsieve                 2.5                      pypi_0    pypi
sqlite                    3.45.3               h2bbff1b_0
tk                        8.6.12               h2bbff1b_0
tomli                     2.0.1                    pypi_0    pypi
tzdata                    2024a                h04d1e81_0
urllib3                   2.2.1                    pypi_0    pypi
vc                        14.2                 h21ff451_1
virtualenv                20.26.1                  pypi_0    pypi
vs2015_runtime            14.27.29016          h5e58377_2
waitress                  3.0.0                    pypi_0    pypi
webob                     1.8.7                    pypi_0    pypi
websockets                12.0                     pypi_0    pypi
webtest                   3.0.0                    pypi_0    pypi
werkzeug                  2.2.2                    pypi_0    pypi
wheel                     0.43.0          py310haa95532_0
xz                        5.4.6                h8cc25b3_1
zipp                      3.18.1                   pypi_0    pypi
zlib                      1.2.13               h8cc25b3_1
zope-event                5.0                      pypi_0    pypi
zope-interface            6.3                      pypi_0    pypi
zope-schema               7.0.1                    pypi_0    pypi

I am using docker for the server and did have an issue when trying to connect to the server separately.
I'm running this on Windows 11

Environment :

  • Errbot version: 6.2.0
  • OS version: Windows 11
  • Python version: 3.10.14
  • conda version : 23.7.4
  • conda-build version : 3.26.0
  • python version : 3.9.17.final.0
  • Using Docker: yes
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

1 participant