AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms' #1757

Closed
opened 2023-07-17 00:25:22 +02:00 by Ghost · 1 comment

homeassistant fails to start with above message.

full server log:

2023-07-16 15:15:09.302 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
File "/usr/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/lib/python3.10/site-packages/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
return await handler(request)
File "/usr/lib/python3.10/site-packages/homeassistant/components/http/forwarded.py", line 82, in forwarded_middleware
from hass_nabucasa import ( # pylint: disable=import-outside-toplevel
File "/etc/homeassistant/deps/lib/python3.10/site-packages/hass_nabucasa/init.py", line 15, in
from .auth import CloudError, CognitoAuth
File "/etc/homeassistant/deps/lib/python3.10/site-packages/hass_nabucasa/auth.py", line 8, in
import boto3
File "/usr/lib/python3.10/site-packages/boto3/init.py", line 17, in
from boto3.session import Session
File "/usr/lib/python3.10/site-packages/boto3/session.py", line 17, in
import botocore.session
File "/usr/lib/python3.10/site-packages/botocore/session.py", line 26, in
import botocore.client
File "/usr/lib/python3.10/site-packages/botocore/client.py", line 15, in
from botocore import waiter, xform_name
File "/usr/lib/python3.10/site-packages/botocore/waiter.py", line 18, in
from botocore.docs.docstring import WaiterDocstring
File "/usr/lib/python3.10/site-packages/botocore/docs/init.py", line 15, in
from botocore.docs.service import ServiceDocumenter
File "/usr/lib/python3.10/site-packages/botocore/docs/service.py", line 14, in
from botocore.docs.client import ClientDocumenter, ClientExceptionsDocumenter
File "/usr/lib/python3.10/site-packages/botocore/docs/client.py", line 17, in
from botocore.docs.example import ResponseExampleDocumenter
File "/usr/lib/python3.10/site-packages/botocore/docs/example.py", line 13, in
from botocore.docs.shape import ShapeDocumenter
File "/usr/lib/python3.10/site-packages/botocore/docs/shape.py", line 19, in
from botocore.utils import is_json_value_header
File "/usr/lib/python3.10/site-packages/botocore/utils.py", line 37, in
import botocore.httpsession
File "/usr/lib/python3.10/site-packages/botocore/httpsession.py", line 45, in
from urllib3.contrib.pyopenssl import (
File "/usr/lib/python3.10/site-packages/urllib3/contrib/pyopenssl.py", line 50, in
import OpenSSL.crypto
File "/etc/homeassistant/deps/lib/python3.10/site-packages/OpenSSL/init.py", line 8, in
from OpenSSL import crypto, SSL
File "/etc/homeassistant/deps/lib/python3.10/site-packages/OpenSSL/crypto.py", line 3268, in
_lib.OpenSSL_add_all_algorithms()
AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'

Search returns that versions of pip, cryptography, pyopenssl, and perhaps other packages must be in agreement. It's hard to get a handle on that agreement.

my versions:
pip: 23.1.2
cryptography: 41.0.2
pyopenssl: 23.2.0
openssl: 3.1.1-r1

homeassistant fails to start with above message. full server log: > 2023-07-16 15:15:09.302 ERROR (MainThread) [aiohttp.server] Error handling request > Traceback (most recent call last): > File "/usr/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request > resp = await request_handler(request) > File "/usr/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle > resp = await handler(request) > File "/usr/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl > return await handler(request) > File "/usr/lib/python3.10/site-packages/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware > return await handler(request) > File "/usr/lib/python3.10/site-packages/homeassistant/components/http/forwarded.py", line 82, in forwarded_middleware > from hass_nabucasa import ( # pylint: disable=import-outside-toplevel > File "/etc/homeassistant/deps/lib/python3.10/site-packages/hass_nabucasa/__init__.py", line 15, in <module> > from .auth import CloudError, CognitoAuth > File "/etc/homeassistant/deps/lib/python3.10/site-packages/hass_nabucasa/auth.py", line 8, in <module> > import boto3 > File "/usr/lib/python3.10/site-packages/boto3/__init__.py", line 17, in <module> > from boto3.session import Session > File "/usr/lib/python3.10/site-packages/boto3/session.py", line 17, in <module> > import botocore.session > File "/usr/lib/python3.10/site-packages/botocore/session.py", line 26, in <module> > import botocore.client > File "/usr/lib/python3.10/site-packages/botocore/client.py", line 15, in <module> > from botocore import waiter, xform_name > File "/usr/lib/python3.10/site-packages/botocore/waiter.py", line 18, in <module> > from botocore.docs.docstring import WaiterDocstring > File "/usr/lib/python3.10/site-packages/botocore/docs/__init__.py", line 15, in <module> > from botocore.docs.service import ServiceDocumenter > File "/usr/lib/python3.10/site-packages/botocore/docs/service.py", line 14, in <module> > from botocore.docs.client import ClientDocumenter, ClientExceptionsDocumenter > File "/usr/lib/python3.10/site-packages/botocore/docs/client.py", line 17, in <module> > from botocore.docs.example import ResponseExampleDocumenter > File "/usr/lib/python3.10/site-packages/botocore/docs/example.py", line 13, in <module> > from botocore.docs.shape import ShapeDocumenter > File "/usr/lib/python3.10/site-packages/botocore/docs/shape.py", line 19, in <module> > from botocore.utils import is_json_value_header > File "/usr/lib/python3.10/site-packages/botocore/utils.py", line 37, in <module> > import botocore.httpsession > File "/usr/lib/python3.10/site-packages/botocore/httpsession.py", line 45, in <module> > from urllib3.contrib.pyopenssl import ( > File "/usr/lib/python3.10/site-packages/urllib3/contrib/pyopenssl.py", line 50, in <module> > import OpenSSL.crypto > File "/etc/homeassistant/deps/lib/python3.10/site-packages/OpenSSL/__init__.py", line 8, in <module> > from OpenSSL import crypto, SSL > File "/etc/homeassistant/deps/lib/python3.10/site-packages/OpenSSL/crypto.py", line 3268, in <module> > _lib.OpenSSL_add_all_algorithms() > AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms' Search returns that versions of pip, cryptography, pyopenssl, and perhaps other packages must be in agreement. It's hard to get a handle on that agreement. my versions: pip: 23.1.2 cryptography: 41.0.2 pyopenssl: 23.2.0 openssl: 3.1.1-r1
Owner

Welcome to my world.
First I see, your box is still running python:3.10. You should upgrade to 3.11.
I am now running HA 2023.10.4,
openssl-3.0.11
cryptography-41.0.4

try a rebuild of the related modules with --usepkg-exclude=*, this avoids usage of (older) cached binary packages.

Welcome to my world. First I see, your box is still running python:3.10. You should upgrade to 3.11. I am now running HA 2023.10.4, openssl-3.0.11 cryptography-41.0.4 try a rebuild of the related modules with --usepkg-exclude=*, this avoids usage of (older) cached binary packages.
Sign in to join this conversation.
No Label
Bug
Bump/Update
Cleanup
Dupe
Enhancement
File Collision
Forked
help wanted
Integration: accuweather
Integration: acmeda
Integration: acomax
Integration: adax
Integration: adguard
Integration: aemet
Integration: aep_ohio
Integration: aep_texas
Integration: airq
Integration: airthings
Integration: airthings_ble
Integration: airtouch5
Integration: airzone
Integration: airzone_cloud
Integration: amazon_polly
Integration: amberelectric
Integration: ambient_station
Integration: analytics_insights
Integration: anel_pwrctrl
Integration: aosmith
Integration: apache_kafka
Integration: apcupsd
Integration: appalachianpower
Integration: apprise
Integration: aprilaire
Integration: aranet
Integration: aseko_pool_live
Integration: asuswrt
Integration: august
Integration: aws
Integration: axis
Integration: backup
Integration: bang_olufsen
Integration: blebox
Integration: blink
Integration: bluetooth
Integration: blue_current
Integration: bmw_connected_drive
Integration: bosch_shc
Integration: bring
Integration: brother
Integration: brottsplatskartan
Integration: bsblan
Integration: bthome
Integration: caldav
Integration: cast
Integration: ccm15
Integration: cloud
Integration: cloudflare
Integration: co2signal
Integration: coautilities
Integration: comelit
Integration: conversation
Integration: debugpy
Integration: deconz
Integration: deluge
Integration: denonavr
Integration: devialet
Integration: devolo_home_control
Integration: dhcp
Integration: discord
Integration: discovergy
Integration: dlna_dmr
Integration: dlna_dms
Integration: doods
Integration: drop_connect
Integration: dsmr
Integration: duotecno
Integration: duquesne_light
Integration: dwd_weather_warnings
Integration: easyenergy
Integration: ecobee
Integration: ecoforest
Integration: ecovacs
Integration: ecowitt
Integration: elgato
Integration: elvia
Integration: energyzero
Integration: enigma2
Integration: enphase_envoy
Integration: epion
Integration: esphome
Integration: evohome
Integration: ffmpeg
Integration: fjaraskupan
Integration: flexit_bacnet
Integration: flipr
Integration: forecast_solar
Integration: foscam
Integration: fritzbox
Integration: fronius
Integration: frontend
Integration: fujitsu_anywair
Integration: fyta
Integration: garages_amsterdam
Integration: gardena_bluetooth
Integration: gdacs
Integration: generic
Integration: geonetnz_quakes
Integration: geonetnz_volcano
Integration: geo_json_events
Integration: geo_rss_events
Integration: gios
Integration: glances
Integration: goodwe
Integration: google
Integration: google_assistant_sdk
Integration: google_generative_ai_conversation
Integration: govee_ble
Integration: govee_light_local
Integration: hive
Integration: hko
Integration: holiday
Integration: homekit_controller
Integration: homematicip_cloud
Integration: homewizard
Integration: honeywell
Integration: hp_ilo
Integration: html5
Integration: http
Integration: hue
Integration: hunterdouglas_powerview
Integration: husqvarna_automower
Integration: huum
Integration: hydrawise
Integration: iammeter
Integration: ibeacon
Integration: idasen_desk
Integration: ign_sismologia
Integration: image_upload
Integration: indianamichiganpower
Integration: insteon
Integration: ipp
Integration: islamic_prayer_times
Integration: justnimbus
Integration: jvc_projector
Integration: kef
Integration: kentuckypower
Integration: keymitt_ble
Integration: knx
Integration: kostal_plenticore
Integration: krispol
Integration: lamarzocco
Integration: ld2410_ble
Integration: leaone
Integration: led_ble
Integration: life360
Integration: lifx
Integration: linear_garage_door
Integration: litejet
Integration: litterrobot
Integration: local_calendar
Integration: local_todo
Integration: loqed
Integration: luci
Integration: lupusec
Integration: lutron
Integration: lutron_caseta
Integration: madeco
Integration: mastodon
Integration: matrix
Integration: matter
Integration: media_extractor
Integration: melcloud
Integration: met
Integration: meteoclimatic
Integration: meteo_france
Integration: metoffice
Integration: microbees
Integration: mill
Integration: minecraft_server
Integration: modbus
Integration: mopeka
Integration: motionblinds_ble
Integration: motionmount
Integration: motion_blinds
Integration: myuplink
Integration: nam
Integration: neato
Integration: netatmo
Integration: nexia
Integration: nextbus
Integration: nextcloud
Integration: nextdns
Integration: nibe_heatpump
Integration: nmap_tracker
Integration: nobo_hub
Integration: norway_air
Integration: notion
Integration: nsw_rural_fire_service_feed
Integration: nuki
Integration: numato
Integration: nut
Integration: nws
Integration: ollama
Integration: oncue
Integration: ondilo_ico
Integration: openai_conversation
Integration: openerz
Integration: open_meteo
Integration: opower
Integration: orvibo
Integration: osoenergy
Integration: otbr
Integration: ourgroceries
Integration: overkiz
Integration: p1_monitor
Integration: pegel_online
Integration: permobil
Integration: plex
Integration: plugwise
Integration: powerwall
Integration: private_ble_device
Integration: proxy
Integration: prusalink
Integration: psoklahoma
Integration: pure_energie
Integration: pvoutput
Integration: qingping
Integration: qld_bushfire
Integration: qrcode
Integration: rabbitair
Integration: rachio
Integration: radio_browser
Integration: rainbird
Integration: rainforest_raven
Integration: rainmachine
Integration: rdw
Integration: recorder
Integration: refoss
Integration: renault
Integration: renson
Integration: reolink
Integration: rflink
Integration: rfxtrx
Integration: ridwell
Integration: ring
Integration: risco
Integration: roborock
Integration: roku
Integration: romy
Integration: roomba
Integration: roon
Integration: route53
Integration: rova
Integration: samsam
Integration: samsungtv
Integration: schlage
Integration: scl
Integration: screenlogic
Integration: sensibo
Integration: sensorpush
Integration: sentry
Integration: seven_segments
Integration: sfr_box
Integration: shelly
Integration: sighthound
Integration: signal_messenger
Integration: simplisafe
Integration: sleepiq
Integration: slimproto
Integration: smarttub
Integration: smud
Integration: snmp
Integration: songpal
Integration: sonos
Integration: sql
Integration: squeezebox
Integration: ssdp
Integration: subaru
Integration: suez_water
Integration: sunweg
Integration: surepetcare
Integration: swepco
Integration: swiss_public_transport
Integration: switchbot
Integration: switchbot_cloud
Integration: switcher_kis
Integration: system_bridge
Integration: tado
Integration: tailwind
Integration: tankerkoenig
Integration: tasmota
Integration: technove
Integration: tedee
Integration: telegram_bot
Integration: temper
Integration: tensorflow
Integration: teslemetry
Integration: tessie
Integration: thermobeacon
Integration: thermopro
Integration: thread
Integration: tile
Integration: tolo
Integration: tplink
Integration: tplink_omada
Integration: tplink_tapo
Integration: traccar
Integration: traccar_server
Integration: trafikverket_camera
Integration: trafikverket_ferry
Integration: trafikverket_train
Integration: trafikverket_weatherstation
Integration: transmission
Integration: tuya
Integration: twentemilieu
Integration: unifi
Integration: unifiprotect
Integration: unifi_direct
Integration: upnp
Integration: usgs_earthquakes_feed
Integration: utility_meter
Integration: v2c
Integration: vallox
Integration: valve
Integration: velbus
Integration: velux
Integration: vicare
Integration: vilfo
Integration: vodafone_station
Integration: vulcan
Integration: wallbox
Integration: waqi
Integration: waze_travel_time
Integration: weatherflow_cloud
Integration: weatherkit
Integration: webmin
Integration: webostv
Integration: wemo
Integration: whirlpool
Integration: withings
Integration: wolflink
Integration: workday
Integration: wyoming
Integration: xiaomi_ble
Integration: yalexs_ble
Integration: yeelight
Integration: yolink
Integration: zamg
Integration: zeroconf
Integration: zha
Integration: zhong_hong
Integration: zondergas
Integration: zoneminder
Integration: zwave_js
invalid
New Integration
Python 3.10
Python 3.11
question
requirement
Requirement vanished
slot-conflict
Source Incomplete
SrcDir ${S} mismatch
TopLevelViolation
Update required
virtual
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: onkelbeh/HomeAssistantRepository#1757
No description provided.