vivalatech / homeassistant-addons

A small script that makes it easy to fling a folder of images onto the Samsung Frame TV
8 stars 1 forks source link

No images found in the media folder - despite the folder containing images #7

Open mpowelltech opened 1 month ago

mpowelltech commented 1 month ago

I have images in the frame folder inside the Home Assistant media directory, but I'm still getting the following error:

INFO:root:Selected source: sources.media_folder INFO:root:No images found in the media folder. Traceback (most recent call last): File "//art.py", line 130, in image_data, file_type, image_url, remote_filename, source_name = get_image_for_tv(tv_ip) ^^^^^^^^^^^^^^^^^^^^^^^ File "//art.py", line 104, in get_image_for_tv image_data, file_type = selected_source.get_image(args, image_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/sources/media_folder.py", line 22, in get_image full_path = os.path.join(folder_path, image_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 90, in join File "", line 152, in _check_arg_types TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'

I can see the frame folder contains images in the UI and on the HAOS Terminal:

image

Version info: Core: 2024.9.2 Supervisor: 2024.09.1 Operating System: 13.1 Frontend:20240909.1 And using the latest version 1.0.4 of this add-on.

I'm wondering if it might be an issue with lines 7-11 in /sources/media_folder.py as this seems to use the path of 'frame' as opposed to something like /media/frame or similar? Not sure if maybe this is built for the docker version as opposed to the HAOS image, so the media folder is different? I'm guessing here but don't have the know-how to test making any changes myself.

Appreciate your work!

Offrinna01 commented 2 weeks ago

Can confirm also have this issue.

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started Using 192.168.0.212 as the IP's of the Samsung Frame INFO:root:Selected source: sources.media_folder INFO:root:No images found in the media folder. Traceback (most recent call last): File "//art.py", line 130, in image_data, file_type, image_url, remote_filename, source_name = get_image_for_tv(tv_ip) ^^^^^^^^^^^^^^^^^^^^^^^ File "//art.py", line 104, in get_image_for_tv image_data, file_type = selected_source.get_image(args, image_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/sources/media_folder.py", line 22, in get_image full_path = os.path.join(folder_path, image_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 90, in join File "", line 152, in _check_arg_types TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType' s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

Core 2024.8.3 Supervisor 2024.09.1 Operating System 12.4 Frontend 20240809.0

[core-ssh ~]$ ls -l /media/frame total 2116 -rwxrwxrwx 1 root root 356912 Oct 7 21:05 ocean.jpg -rwxrwxrwx 1 root root 607931 Oct 7 21:05 treeresting.jpg -rwxrwxrwx 1 root root 493652 Oct 7 21:08 trees.jpg -rwxrwxrwx 1 root root 351708 Oct 7 21:04 waves.jpg -rwxrwxrwx 1 root root 344941 Oct 7 21:09 winery.jpg [core-ssh ~]$

cjhollie commented 1 week ago

I'm also having this issue