HACS integration issue1

Hi, can somebody please help me complete my hacs integration? I’ve extracted the files from the installation over to custom_components and I’m able to select "HACS (Home Assistant Community Store) from the integration menu. When I select it though, it gives me this following error:

2020-04-17 03:07:56 INFO (SyncWorker_9) [homeassistant.util.package] Attempting install of aiofiles==0.5.0
2020-04-17 03:08:08 ERROR (SyncWorker_9) [homeassistant.util.package] Unable to install package aiofiles==0.5.0: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: ‘/srv/homeassistant/lib/python3.7/site-packages/aiofiles’
Consider using the --user option or check the permissions.
2020-04-17 03:08:08 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_protocol.py”, line 418, in start
resp = await task
File “/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_app.py”, line 458, in _handle
resp = await handler(request)
File “/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_middlewares.py”, line 119, in impl
return await handler(request)
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py”, line 39, in real_ip_middleware
return await handler(request)
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/ban.py”, line 72, in ban_middleware
return await handler(request)
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/auth.py”, line 127, in auth_middleware
return await handler(request)
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/view.py”, line 123, in handle
result = await result
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/config/config_entries.py”, line 130, in post
return await super().post(request)
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/data_validator.py”, line 50, in wrapper
result = await method(view, request, *args, **kwargs)
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/data_entry_flow.py”, line 62, in post
handler, context={“source”: config_entries.SOURCE_USER}
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/data_entry_flow.py”, line 100, in async_init
flow = await self.async_create_flow(handler, context=context, data=data)
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config_entries.py”, line 501, in async_create_flow
await async_process_deps_reqs(self.hass, self._hass_config, integration)
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py”, line 291, in async_process_deps_reqs
hass, integration.domain
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/requirements.py”, line 55, in async_get_integration_with_requirements
hass, integration.domain, integration.requirements
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/requirements.py”, line 105, in async_process_requirements
raise RequirementsNotFound(name, [req])
homeassistant.requirements.RequirementsNotFound: Requirements for hacs not found: [‘aiofiles==0.5.0’].

Thanks

How did you install Home Assistant? Which guide did you follow? This looks like possibly you’re running a venv install?

Firstly, thank you for your reply!
Venv sounds about right, I followed the guide at this web address: https://www.home-assistant.io/docs/installation/raspberry-pi/

Then it looks like you’re running it as the wrong user there, or have at some point in the past.

Try

find /srv/homeassistant ! -user homeassistant -print|wc -l

That should return zero. If it doesn’t you can fix with:

chown -R homeassistant:homeassistant /srv/homeassistant

I entered that and it returned 0. I also ran the second line anyway but I’m still receiving the same error.

Then, probably you’re starting the service as the wrong user. Check your systemd script.

You may want to head over to the #alternative channel on the Discord server and get more interactive help.

UNIT LOAD ACTIVE SUB DESCRIPTION
proc-sys-fs-binfmt_misc.automount loaded active waiting Arbitrary Executable File Formats File System Automount Point
sys-devices-platform-soc-3f201000.serial-tty-ttyAMA0-hci0.device loaded active plugged /sys/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0
sys-devices-platform-soc-3f201000.serial-tty-ttyAMA0.device loaded active plugged /sys/devices/platform/soc/3f201000.serial/tty/ttyAMA0
sys-devices-platform-soc-3f202000.mmc-mmc_host-mmc0-mmc0:aaaa-block-mmcblk0-mmcblk0p1.device loaded active plugged /sys/devices/platform/soc/3f202000.mmc/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/
sys-devices-platform-soc-3f202000.mmc-mmc_host-mmc0-mmc0:aaaa-block-mmcblk0-mmcblk0p2.device loaded active plugged /sys/devices/platform/soc/3f202000.mmc/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/
sys-devices-platform-soc-3f202000.mmc-mmc_host-mmc0-mmc0:aaaa-block-mmcblk0.device loaded active plugged /sys/devices/platform/soc/3f202000.mmc/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0
sys-devices-platform-soc-3f300000.mmcnr-mmc_host-mmc1-mmc1:0001-mmc1:0001:1-net-wlan0.device loaded active plugged /sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/
sys-devices-platform-soc-3f980000.usb-usb1-1\x2d1-1\x2d1.1-1\x2d1.1:1.0-net-eth0.device loaded active plugged SMSC9512/9514 Fast Ethernet Adapter
sys-devices-platform-soc-soc:audio-sound-card0.device loaded active plugged /sys/devices/platform/soc/soc:audio/sound/card0
sys-devices-virtual-block-ram0.device loaded active plugged /sys/devices/virtual/block/ram0
sys-devices-virtual-block-ram1.device loaded active plugged /sys/devices/virtual/block/ram1
sys-devices-virtual-block-ram10.device loaded active plugged /sys/devices/virtual/block/ram10
sys-devices-virtual-block-ram11.device loaded active plugged /sys/devices/virtual/block/ram11
sys-devices-virtual-block-ram12.device loaded active plugged /sys/devices/virtual/block/ram12
sys-devices-virtual-block-ram13.device loaded active plugged /sys/devices/virtual/block/ram13
sys-devices-virtual-block-ram14.device loaded active plugged /sys/devices/virtual/block/ram14
sys-devices-virtual-block-ram15.device loaded active plugged /sys/devices/virtual/block/ram15
sys-devices-virtual-block-ram2.device loaded active plugged /sys/devices/virtual/block/ram2
sys-devices-virtual-block-ram3.device loaded active plugged /sys/devices/virtual/block/ram3
sys-devices-virtual-block-ram4.device loaded active plugged /sys/devices/virtual/block/ram4
sys-devices-virtual-block-ram5.device loaded active plugged /sys/devices/virtual/block/ram5
sys-devices-virtual-block-ram6.device loaded active plugged /sys/devices/virtual/block/ram6
sys-devices-virtual-block-ram7.device loaded active plugged /sys/devices/virtual/block/ram7
sys-devices-virtual-block-ram8.device loaded active plugged /sys/devices/virtual/block/ram8
sys-devices-virtual-block-ram9.device loaded active plugged /sys/devices/virtual/block/ram9
sys-devices-virtual-misc-rfkill.device loaded active plugged /sys/devices/virtual/misc/rfkill
sys-devices-virtual-tty-ttyprintk.device loaded active plugged /sys/devices/virtual/tty/ttyprintk
sys-module-configfs.device loaded active plugged /sys/module/configfs
sys-subsystem-bluetooth-devices-hci0.device loaded active plugged /sys/subsystem/bluetooth/devices/hci0
sys-subsystem-net-devices-eth0.device loaded active plugged SMSC9512/9514 Fast Ethernet Adapter
sys-subsystem-net-devices-wlan0.device loaded active plugged /sys/subsystem/net/devices/wlan0
-.mount loaded active mounted /
boot.mount loaded active mounted /boot
dev-mqueue.mount loaded active mounted POSIX Message Queue File System
run-rpc_pipefs.mount loaded active mounted RPC Pipe File System
run-user-1000.mount loaded active mounted /run/user/1000
sys-kernel-config.mount loaded active mounted Kernel Configuration File System
sys-kernel-debug.mount loaded active mounted Kernel Debug File System
systemd-ask-password-console.path loaded active waiting Dispatch Password Requests to Console Directory Watch
systemd-ask-password-wall.path loaded active waiting Forward Password Requests to Wall Directory Watch
init.scope loaded active running System and Service Manager
session-c1.scope loaded active running Session c1 of user pi
alsa-restore.service loaded active exited Save/Restore Sound Card State
alsa-state.service loaded active running Manage Sound Card State (restore and store)
avahi-daemon.service loaded active running Avahi mDNS/DNS-SD Stack
bluetooth.service loaded active running Bluetooth service
console-setup.service loaded active exited Set console font and keymap
cron.service loaded active running Regular background program processing daemon
dbus.service loaded active running D-Bus System Message Bus
dhcpcd.service loaded active running dhcpcd on all interfaces
dphys-swapfile.service loaded active exited dphys-swapfile - set up, mount/unmount, and delete a swap file
fake-hwclock.service loaded active exited Restore / save the current clock
[email protected] loaded active running Getty on tty1
hciuart.service loaded active running Configure Bluetooth Modems connected by UART
[email protected] loaded failed failed Home Assistant
ifupdown-pre.service loaded active exited Helper to synchronize boot up for ifupdown
keyboard-setup.service loaded active exited Set the console keyboard layout
kmod-static-nodes.service loaded active exited Create list of required static device nodes for the current kernel
networking.service loaded active exited Raise network interfaces
nmbd.service loaded active running Samba NMB Daemon
raspi-config.service loaded active exited LSB: Switch to ondemand cpu governor (unless shift key is pressed)
rc-local.service loaded active exited /etc/rc.local Compatibility
rng-tools.service loaded active running rng-tools.service
rpi-eeprom-update.service loaded active exited Check for Raspberry Pi EEPROM updates
rsyslog.service loaded active running System Logging Service
smbd.service loaded active running Samba SMB Daemon
ssh.service loaded active running OpenBSD Secure Shell server
systemd-fsck-root.service loaded active exited File System Check on Root Device
systemd-fsck@dev-disk-by\x2dpartuuid-738a4d67\x2d01.service loaded active exited File System Check on /dev/disk/by-partuuid/738a4d67-01
systemd-journal-flush.service loaded active exited Flush Journal to Persistent Storage
systemd-journald.service loaded active running Journal Service
systemd-logind.service loaded active running Login Service
systemd-modules-load.service loaded active exited Load Kernel Modules
systemd-random-seed.service loaded active exited Load/Save Random Seed
systemd-remount-fs.service loaded active exited Remount Root and Kernel File Systems
systemd-sysctl.service loaded active exited Apply Kernel Variables
systemd-sysusers.service loaded active exited Create System Users
systemd-timesyncd.service loaded active running Network Time Synchronization
systemd-tmpfiles-setup-dev.service loaded active exited Create Static Device Nodes in /dev
systemd-tmpfiles-setup.service loaded active exited Create Volatile Files and Directories
systemd-udev-trigger.service loaded active exited udev Coldplug all Devices
systemd-udevd.service loaded active running udev Kernel Device Manager
systemd-update-utmp.service loaded active exited Update UTMP about System Boot/Shutdown
systemd-user-sessions.service loaded active exited Permit User Sessions
triggerhappy.service loaded active running triggerhappy global hotkey daemon
[email protected] loaded active exited User Runtime Directory /run/user/1000
[email protected] loaded active running User Manager for UID 1000
wpa_supplicant.service loaded active running WPA supplicant
-.slice loaded active active Root Slice
system-bthelper.slice loaded active active system-bthelper.slice
system-getty.slice loaded active active system-getty.slice
system-home\x2dassistant.slice loaded active active system-home\x2dassistant.slice
system-systemd\x2dfsck.slice loaded active active system-systemd\x2dfsck.slice
system.slice loaded active active System Slice
user-1000.slice loaded active active User Slice of UID 1000
user.slice loaded active active User and Session Slice
avahi-daemon.socket loaded active running Avahi mDNS/DNS-SD Stack Activation Socket
dbus.socket loaded active running D-Bus System Message Bus Socket
syslog.socket loaded active running Syslog Socket
systemd-fsckd.socket loaded active listening fsck to fsckd communication Socket
systemd-initctl.socket loaded active listening initctl Compatibility Named Pipe
systemd-journald-dev-log.socket loaded active running Journal Socket (/dev/log)
systemd-journald.socket loaded active running Journal Socket
systemd-rfkill.socket loaded active listening Load/Save RF Kill Switch Status /dev/rfkill Watch
systemd-udevd-control.socket loaded active running udev Control Socket
systemd-udevd-kernel.socket loaded active running udev Kernel Socket
triggerhappy.socket loaded active running triggerhappy.socket
var-swap.swap loaded active active /var/swap
basic.target loaded active active Basic System
bluetooth.target loaded active active Bluetooth
cryptsetup.target loaded active active Local Encrypted Volumes
getty.target loaded active active Login Prompts
graphical.target loaded active active Graphical Interface
local-fs-pre.target loaded active active Local File Systems (Pre)
local-fs.target loaded active active Local File Systems
multi-user.target loaded active active Multi-User System
network-online.target loaded active active Network is Online
network.target loaded active active Network
nfs-client.target loaded active active NFS client services
paths.target loaded active active Paths
remote-fs-pre.target loaded active active Remote File Systems (Pre)
remote-fs.target loaded active active Remote File Systems
slices.target loaded active active Slices
sockets.target loaded active active Sockets
sound.target loaded active active Sound Card
swap.target loaded active active Swap
sysinit.target loaded active active System Initialization
time-sync.target loaded active active System Time Synchronized
timers.target loaded active active Timers
apt-daily-upgrade.timer loaded active waiting Daily apt upgrade and clean activities
apt-daily.timer loaded active waiting Daily apt download activities
logrotate.timer loaded active waiting Daily rotation of log files
man-db.timer loaded active waiting Daily man-db regeneration
systemd-tmpfiles-clean.timer loaded active waiting Daily Cleanup of Temporary Directories

What am I looking for?

You’re looking for either code markup (as explained here) or to post that mass to somewhere like this so that it’s a lot easier for folks to read.