custom-components / pyscript

Pyscript adds rich Python scripting to HASS
Apache License 2.0
894 stars 47 forks source link

Error when import httpx lib. #603

Open yagithubuser opened 6 months ago

yagithubuser commented 6 months ago

custom_components.pyscript.modules.httpx._api._client._auth._models._status_codes

custom_components/pyscript/global_ctx.py:341

Exception in </config/pyscript/modules/httpx/_status_codes.py> line 155: NETWORK_AUTHENTICATION_REQUIRED = 511, "Network Authentication Required" ^ AttributeError: 'dict' object has no attribute '_member_names'

httpx version is 0.27.0 This is a part of _status_codes_py

...
    LOOP_DETECTED = 508, "Loop Detected"
    NOT_EXTENDED = 510, "Not Extended"
    NETWORK_AUTHENTICATION_REQUIRED = 511, "Network Authentication Required"

# Include lower-case styles for `requests` compatibility.
for code in codes:
    setattr(codes, code._name_.lower(), int(code))