maxileith / homebridge-appletv-enhanced

Homebridge plugin that exposes Apple TVs with features that should be native to Apple HomeKit.
MIT License
186 stars 3 forks source link

Error with PIP after upgrade from OS 11 to 12. #715

Open leandromagro opened 5 hours ago

leandromagro commented 5 hours ago

Preconditions

Current Situation

After upgrade the system to meet new versions of SSL and Python, I started to get the errors pointed in the log. Looks like PIP is not found according to the error ModuleNotFoundError: No module named 'pip'. Tried to reinstall both python and pip but did not fix the issue.

Logs

[29/10/2024, 19:45:25] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[29/10/2024, 19:45:30] [HB Supervisor] Restarting Homebridge...
[29/10/2024, 19:45:30] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules -D --strict-plugin-resolution
[29/10/2024, 19:45:30] [HB Supervisor] Started Homebridge v1.8.5 with PID: 2622
[29/10/2024, 19:45:32] Loaded config.json with 10 accessories and 8 platforms.
[29/10/2024, 19:45:32] Loaded 4 cached accessories from cachedAccessories.
[29/10/2024, 19:45:33] ---
[29/10/2024, 19:45:33] Loaded plugin: homebridge-appletv-enhanced@1.9.1
[29/10/2024, 19:45:33] Registering platform 'homebridge-appletv-enhanced.AppleTVEnhanced'
[29/10/2024, 19:45:33] ---
[29/10/2024, 19:45:34] Loaded plugin: homebridge-denon-tv@5.1.25
[29/10/2024, 19:45:34] Registering platform 'homebridge-denon-tv.DenonTv'
[29/10/2024, 19:45:34] ---
[29/10/2024, 19:45:35] Loaded plugin: homebridge-lg-thinq@1.8.9
[29/10/2024, 19:45:35] Registering platform 'homebridge-lg-thinq.LGThinQ'
[29/10/2024, 19:45:35] ---
[29/10/2024, 19:45:35] Loaded plugin: homebridge-magic-occupancy@4.0.1
[29/10/2024, 19:45:35] Registering accessory 'homebridge-magic-occupancy.MagicOccupancy'
[29/10/2024, 19:45:35] ---
[29/10/2024, 19:45:35] Loaded plugin: homebridge-midea-platform@1.2.2
[29/10/2024, 19:45:35] Registering platform 'homebridge-midea-platform.midea-platform'
[29/10/2024, 19:45:35] ---
[29/10/2024, 19:45:36] Loaded plugin: homebridge-smart-irrigation@1.7.2
[29/10/2024, 19:45:36] Registering accessory 'homebridge-smart-irrigation.SmartSprinklers'
[29/10/2024, 19:45:36] ---
[29/10/2024, 19:45:37] Loaded plugin: homebridge-weather-plus@3.3.5
[29/10/2024, 19:45:41] [Homebridge UI] Changes to config.json saved.
[29/10/2024, 19:45:41] Registering platform 'homebridge-weather-plus.WeatherPlus'
[29/10/2024, 19:45:41] ---
[29/10/2024, 19:45:41] Loading 8 platforms...

[29/10/2024, 19:45:42] Initializing platform accessory 'Clima'...
[29/10/2024, 19:45:42] Initializing platform accessory 'Prev Today'...
[29/10/2024, 19:45:42] Initializing platform accessory 'Prev In 1 Day'...

[29/10/2024, 19:45:42] [Apple TV Enhanced] Initializing AppleTVEnhanced platform...
[29/10/2024, 19:45:42] [Apple TV Enhanced] [I] Platform: Finished initializing platform: Apple TV Enhanced
[
[29/10/2024, 19:45:42] [Homebridge UI] Homebridge restart request received
[29/10/2024, 19:45:42] [Apple TV Enhanced] [I] Update check: The update checker is configured to check for updates between 3:00 and 3:59, excluding betas. Auto updating is turned off.
[29/10/2024, 19:45:42] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process
[29/10/2024, 19:45:42] [Homebridge UI] Sending SIGTERM to Homebridge
[29/10/2024, 19:45:42] Publishing bridge accessory 

[29/10/2024, 19:45:42] Homebridge v1.8.5 (HAP v0.12.3) (Aroeira) is running on port 51823.
[29/10/2024, 19:45:42] 

NOTICE TO USERS AND PLUGIN DEVELOPERS
> Homebridge 2.0 is on the way and brings some breaking changes to existing plugins.
> Please visit the following link to learn more about the changes and how to prepare:
> https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

[29/10/2024, 19:45:43] [Apple TV Enhanced] [S] Update check: You are using the latest version of AppleTV Enhanced (excluding betas): 1.9.1
[29/10/2024, 19:45:43] [Apple TV Enhanced] [I] Python check: Starting python check.
[29/10/2024, 19:45:43] [Apple TV Enhanced] [I] Python check: plugin dir exists.

[29/10/2024, 19:45:43] [Apple TV Enhanced] [I] Python check: OpenSSL 3.4.0 is installed and compatible.

[29/10/2024, 19:45:43] [Apple TV Enhanced] [I] Python check: Python 3.11.2 is installed and supported by the plugin.
[29/10/2024, 19:45:43] [Apple TV Enhanced] [I] Python check: Virtual environment already exists.
[29/10/2024, 19:45:44] [Apple TV Enhanced] [I] Python check: Virtual environment is using the systems default python environment. Continuing ...
[29/10/2024, 19:45:44] [Apple TV Enhanced] [E] Python check: Traceback (most recent call last):
  File "/var/lib/homebridge/appletv-enhanced/.venv/bin/pip3", line 5, in <module>

[29/10/2024, 19:45:44] [Apple TV Enhanced] [E] Python check:     from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'

[29/10/2024, 19:45:44] [Apple TV Enhanced] [I] Python check: Venv pip version: 
[29/10/2024, 19:45:44] [Apple TV Enhanced] [I] Python check: Checking if there is an update for venv pip ...
[29/10/2024, 19:45:44] [Apple TV Enhanced] [W] Python check: Venv pip is outdated. Updating now ...

[29/10/2024, 19:45:44] [Apple TV Enhanced] [E] Python check: Traceback (most recent call last):
  File "/var/lib/homebridge/appletv-enhanced/.venv/bin/pip3", line 5, in <module>

[29/10/2024, 19:45:44] [Apple TV Enhanced] [E] Python check:     from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'

[29/10/2024, 19:45:44] [Apple TV Enhanced] [S] Python check: Venv pip updated

[29/10/2024, 19:45:44] [Apple TV Enhanced] [E] Python check: Traceback (most recent call last):
  File "/var/lib/homebridge/appletv-enhanced/.venv/bin/pip3", line 5, in <module>

[29/10/2024, 19:45:44] [Apple TV Enhanced] [E] Python check:     from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'

[29/10/2024, 19:45:44] [Apple TV Enhanced] [W] Python check: Python requirements are not satisfied. Installing them now ...
[29/10/2024, 19:45:44] [Apple TV Enhanced] [E] Python check: Traceback (most recent call last):
  File "/var/lib/homebridge/appletv-enhanced/.venv/bin/pip3", line 5, in <module>

[29/10/2024, 19:45:44] [Apple TV Enhanced] [E] Python check:     from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'

[29/10/2024, 19:45:44] [Apple TV Enhanced] [S] Python check: Python requirements installed.
[29/10/2024, 19:45:44] [Apple TV Enhanced] [S] Python check: Finished
[29/10/2024, 19:45:44] [Apple TV Enhanced] [I] Platform: Starting device discovery ...
[29/10/2024, 19:45:45] Error: Unable to execute request M: Traceback (most recent call last):
  File "/var/lib/homebridge/appletv-enhanced/.venv/bin/atvscript", line 5, in <module>from pyatv.scripts.atvscript import main
ModuleNotFoundError: No module named 'pyatv'
    at g (/var/lib/homebridge/node_modules/homebridge-appletv-enhanced/node_modules/@sebbo2002/node-pyatv/src/lib/tools.ts:189:15)
    at Function.find (/var/lib/homebridge/node_modules/homebridge-appletv-enhanced/node_modules/@sebbo2002/node-pyatv/src/lib/instance.ts:128:26)
    at AppleTVEnhancedPlatform.discoverDevices (/var/lib/homebridge/node_modules/homebridge-appletv-enhanced/src/appleTVEnhancedPlatform.ts:114:67)

[29/10/2024, 19:45:48] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[29/10/2024, 19:45:53] [HB Supervisor] Restarting Homebridge...
[29/10/2024, 19:45:53] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules -D --strict-plugin-resolution
[29/10/2024, 19:45:53] [HB Supervisor] Started Homebridge v1.8.5 with PID: 2661

Configuration

{
            "name": "Apple TV Enhanced",
            "mediaTypes": [
                "music",
                "video",
                "tv",
                "unknown"
            ],
            "deviceStates": [
                "idle",
                "playing",
                "loading",
                "seeking",
                "paused",
                "stopped"
            ],
            "deviceStateDelay": 0,
            "avadaKedavraAppAmount": 15,
            "disableVolumeControlRemote": false,
            "absoluteVolumeControl": false,
            "discover": {
                "multicast": true
            },
            "forceVenvRecreate": false,
            "logLevel": 3,
            "updateCheckLevel": "stable",
            "updateCheckTime": 3,
            "deviceSpecificOverrides": [
                {
                    "overrideMediaTypes": false,
                    "overrideDeviceStates": false,
                    "overrideDeviceStateDelay": false,
                    "deviceStateDelay": 0,
                    "overrideRemoteKeysAsSwitch": false,
                    "overrideAvadaKedavraAppAmount": false,
                    "avadaKedavraAppAmount": 15,
                    "overrideCustomInputURIs": false,
                    "overrideDisableVolumeControlRemote": false,
                    "disableVolumeControlRemote": false,
                    "overrideAbsoluteVolumeControl": false,
                    "absoluteVolumeControl": false
                }
            ],
            "platform": "AppleTVEnhanced"
        }

Operating System

Linux

Operating System: Bits

32-bit

Operating System: Distribution

Raspbian GNU/Linux

Operating System: Distribution Version

12 (bookworm)

Docker

no

Docker Image

None

Docker Image Tag

No response

Homebridge Version

1.8.5

Homebridge Config UI Version

v4.62.0

Homebridge Storage Path

/var/lib/homebridge

Homebridge Apple TV Enhanced Version

1.9.1

Node Version

v20.18.0

NPM Version

10.8.2

Python Version

3.11.2

PIP Version

23.0.1

HDMI Hops

No response

Audio Output

no

Same Subnet

yes

Additional Context

No response

github-actions[bot] commented 4 hours ago

❗ Action required

There are a few problems with your opened issue. Please fix them by editing the issue:

Often the problem you are experiencing will be solved by simply making your environment compliant with the requirements (fulfilling the pre-checks).

🔁 Rerun

After editing the issue, the checks will be run again.

Under no circumstances should the issue be adjusted untruthfully. If the issue cannot fulfill the pre-checks, your environment is simply not supported.

If you do not adjust the issue accordingly, the issue will be automatically closed after 60 days of inactivity.