Repository navigation
Fix install failures from PyPI collision and systemd key misplacement - #5
Merged
Merged
Conversation
…ment requirements.txt pinned weatherhat==1.0.0 from PyPI, which shadowed the local package in this repo and masked the ha_discovery, i2c_recovery, and other modules added here. Fresh installs via install-service.sh ended with ModuleNotFoundError: No module named 'weatherhat.ha_discovery' (reported in issue #3). update.sh happened to work because it reinstalls the local package with --no-deps after syncing. - Drop weatherhat==1.0.0 from requirements.txt - Install the local package in install-service.sh (matches update.sh) - Move StartLimitBurst/StartLimitIntervalSec from [Service] to [Unit] in both unit files; systemd was silently ignoring them - Document swap setup in README for Pi Zero/Zero 2 W/3A+ where numpy source-builds OOM on 512 MB boards Fixes #3
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3. Fresh installs via
scripts/install-service.shcrashed on service start with:Root cause:
requirements.txtpinnedweatherhat==1.0.0from PyPI, which shadowed the localweatherhat/package in this repo. The PyPI release lacksha_discovery,i2c_recovery, and other modules added in this fork. Existing deployments happened to work becausescripts/update.shreinstalls the local package viapip install --no-deps .after sync — butinstall-service.shnever ran that step.Changes
requirements.txt— removedweatherhat==1.0.0scripts/install-service.sh— addedpip install --no-deps "$TARGET_PROJECT"after requirements install so the local package lands in the venvweatherhat.service,weatherhat-display.service— movedStartLimitBurstandStartLimitIntervalSecfrom[Service]to[Unit]. systemd was emittingUnknown keywarnings and silently ignoring the restart-limit policyREADME.md— added Prerequisites note with a swap-enable recipe for Pi Zero/Zero 2 W/3A+ where numpy 1.26.4 source-builds OOM on 512 MB boardsTest plan
sudo ./scripts/install-service.sh, confirm service starts withoutModuleNotFoundErrorsystemd-analyze verify /etc/systemd/system/weatherhat.servicereturns zero warnings aboutStartLimit*journalctl -u weatherhatno longer showsUnknown key 'StartLimitIntervalSec' in section [Service], ignoring.sudo ./scripts/update.shpodman build) still succeeds (Containerfile was already doingpip install .after requirements, so unaffected)