Hi, I’m new here, I have also tried to no avail. to setup a devel environment and run tox without errors :
-
I followed TO THE LETTER the instructions to run devcontainer : HA starts on CLEAN DEV branch. but I can’t get tox to work
-
out of idea, I started my wsl2 ubuntu 20.04 :
- I’m on CLEAN DEV git clone, no modification AT ALL
- I installed dependencies I could find here and there
- I ran script/setup and venv/bin/activate.
and yet … I still get lots of failing checks by running “tox -e py38”. 7 red “F” that I suppose are failled checks.
this is ridiculous ! has ANYONE succesfully run tox locally on the dev branch ?!? I’m trying to fix a bug I reported, but reaaaaally, that is discouraging and frustrating … we need clear steps to follow ! If even dev branch does not pass tests, how are WE supposed to get them passed, before doing a P.R. ???
here are some extracts from the failures :
the failures, on all the test envs I have tried (python 3.8) :
FAILED tests/components/homekit/test_type_cameras.py::test_camera_stream_source_configured[pyloop] - KeyError: UUID('3303d503-17cc-469a-b672-92436a71a2f6')
FAILED tests/components/homekit/test_type_cameras.py::test_camera_stream_source_found[pyloop] - KeyError: UUID('3303d503-17cc-469a-b672-92436a71a2f6')
FAILED tests/components/homekit/test_type_cameras.py::test_camera_stream_source_configured_and_copy_codec[pyloop] - KeyError: UUID('3303d503-17cc-469a-b672-92436a71a2f6')
FAILED tests/components/stream/test_recorder.py::test_record_stream_audio[pyloop] - Failed: Timeout >9.0s
FAILED tests/components/telegram/test_notify.py::test_reload_notify[pyloop] - ModuleNotFoundError: No module named 'telegram'
FAILED tests/util/test_package.py::test_check_package_version_does_not_match - AssertionError: assert not True
ERROR tests/components/shopping_list/test_intent.py::test_recent_items_intent[pyloop] - RuntimeError: Event loop is closed
self = <accessory display_name='Camera' services=['AccessoryInformation', 'Microphone', 'CameraRTPStreamManagement', 'CameraRTPStreamManagement', 'CameraRTPStreamManagement']>
session_id = UUID('3303d503-17cc-469a-b672-92436a71a2f6')
@callback
def _async_stop_ffmpeg_watch(self, session_id):
"""Cleanup a streaming session after stopping."""
> if FFMPEG_WATCHER not in self.sessions[session_id]:
E KeyError: UUID('3303d503-17cc-469a-b672-92436a71a2f6')
homeassistant/components/homekit/type_cameras.py:436: KeyError
multiples ffmpeg errors on “stream unexpected stop” or keyerror
DEBUG:homeassistant.components.homekit.type_cameras:FFmpeg output settings: -map 0:v:0 -an -c:v libx264 -profile:v high -tune zerolatency -pix_fmt yuv420p -r 30 -b:v 299k -bufsize 1196k -maxrate 299k -payload_type 99 -ssrc 1334673 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params zdPmNLWeI86DtLJHvVLI6YPvqhVeeiLsNtrAgbgL srtp://192.168.208.5:51246?rtcpport=51246&localrtcpport=51246&pkt_size=1316 -map 0:a:0 -vn -c:a libopus -application lowdelay -ac 1 -ar 24k -b:a 24k -bufsize 96k -payload_type 110 -ssrc 8646279 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params shnETgfD+7xUQ8zRdsaytY11wu6CO73IJ+RZVJpU srtp://192.168.208.5:51108?rtcpport=51108&localrtcpport=51108&pkt_size=188
INFO:homeassistant.components.homekit.type_cameras:[3303d503-17cc-469a-b672-92436a71a2f6] Started stream process - PID 1
WARNING:homeassistant.components.homekit.type_cameras:Streaming process ended unexpectedly - PID 1
ERROR:pyhap.camera:[3303d503-17cc-469a-b672-92436a71a2f6] Failed to start/reconfigure stream, deleting session.
a telegram bot error :
_______________________________________________________________________________________ test_reload_notify[pyloop] ________________________________________________________________________________________
[gw0] linux -- Python 3.8.5 /home/arnaud/core/.tox/py38/bin/python
thing = <module 'homeassistant.components' from '/home/arnaud/core/homeassistant/components/__init__.py'>, comp = 'telegram_bot', import_path = 'homeassistant.components.telegram_bot'
def _dot_lookup(thing, comp, import_path):
try:
> return getattr(thing, comp)
E AttributeError: module 'homeassistant.components' has no attribute 'telegram_bot'
/usr/lib/python3.8/unittest/mock.py:1215: AttributeError
During handling of the above exception, another exception occurred:
hass = <homeassistant.core.HomeAssistant object at 0x7fbca5b31ee0>
> ???
a mysterious record stream timeout :
____________________________________________________________________________________ test_record_stream_audio[pyloop] _____________________________________________________________________________________
[gw6] linux -- Python 3.8.5 /home/arnaud/core/.tox/py38/bin/python
hass = <homeassistant.core.HomeAssistant object at 0x7fa1dd4140a0>, hass_client = <function hass_client.<locals>.auth_client at 0x7fa1dd3caee0>
stream_worker_sync = <tests.components.stream.conftest.WorkerSync object at 0x7fa1dd0f8160>, record_worker_sync = <tests.components.stream.test_recorder.SaveRecordWorkerSync object at 0x7fa1dd6e94f0>
> ???
/workspaces/core/tests/components/stream/test_recorder.py:235:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
container_format = 'mov', audio_codec = None
def generate_h264_video(container_format="mp4", audio_codec=None):
"""
Generate a test video.
See: http://docs.mikeboers.com/pyav/develop/cookbook/numpy.html
"""
.....
frame = av.VideoFrame.from_ndarray(img, format="rgb24")
> for packet in stream.encode(frame):
E Failed: Timeout >9.0s
tests/components/stream/common.py:71: Failed
some cryptic “deprecated default configuration check” :
______________________________________________________________________________________ test_deprecated_with_default _______________________________________________________________________________________
[gw2] linux -- Python 3.8.5 /home/arnaud/core/.tox/py38/bin/python
caplog = <_pytest.logging.LogCaptureFixture object at 0x7f82b85f8be0>
schema = <Schema({'venus': <function boolean at 0x7f8312eb3670>, 'mars': <function boolean at 0x7f8312eb3670>, 'jupiter': <function boolean at 0x7f8312eb3670>}, extra=PREVENT_EXTRA, required=False) object at 0x7f82b85f8790>
> ???
E AssertionError: assert 'homeassistan...ig_validation' == 'tests.helper...ig_validation'
E - tests.helpers.test_config_validation
E ? ^ ^ -----
E + homeassistant.helpers.config_validation
E ? ^^^ ++++ ^^^
/workspaces/core/tests/helpers/test_config_validation.py:720: AssertionError
------------------------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------------------------
WARNING:homeassistant.helpers.config_validation:The 'mars' option is deprecated, please remove it from your configuration
-------------------------------------------------------------------------------------------- Captured log call --------------------------------------------------------------------------------------------
WARNING homeassistant.helpers.config_validation:config_validation.py:747 The 'mars' option is deprecated, please remove it from your configuration
________________________________________________________________________________ test_check_package_version_does_not_match ________________________________________________________________________________
[gw1] linux -- Python 3.8.5 /home/arnaud/core/.tox/py38/bin/python
> ???
E AssertionError: assert not True
E + where True = <function is_installed at 0x7f1de8937040>('homeassistant>=999.999.999')
E + where <function is_installed at 0x7f1de8937040> = package.is_installed
/workspaces/core/tests/util/test_package.py:257: AssertionError
I’m about to giving up