A different DVR Schedule view

Not running for me.
Spun up a container with Alpine 3.15 and Python 3.10.1

/usr/src/app # ls -l
total 16
-rwxrwxrwx 1 1026 users 8083 Jan 8 12:32 channels-dvr-gantt.py

/usr/src/app # python --version
Python 3.10.1

/usr/src/app # python channels-dvr-gantt.py
Traceback (most recent call last):
File "/usr/src/app/channels-dvr-gantt.py", line 5, in
import requests
ModuleNotFoundError: No module named 'requests'

You need the alpine package py3-requests

Is that a container image or what?
How do I install it?

apk update && apk install py3-requests

/usr/src/app # apk update && apk install py3-requests
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
v3.15.0-184-g273f76be99 [https://dl-cdn.alpinelinux.org/alpine/v3.15/main]
v3.15.0-185-gbcd59a6d7f [https://dl-cdn.alpinelinux.org/alpine/v3.15/community]
OK: 15847 distinct packages available
ERROR: 'install' is not an apk command. See 'apk --help'.

sorry it's apk add py3-requests

each linux distribution has its own way of installing package. alpine uses apk.

https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management

Thanks for trying to help, but even after updating I'm still getting the same error.
I first need to figure out how to get my container to start with a shell prompt instead of starting in the python interactive interpreter.

/usr/src/app # apk update && apk add py3-requests
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
v3.15.0-184-g273f76be99 [https://dl-cdn.alpinelinux.org/alpine/v3.15/main]
v3.15.0-185-gbcd59a6d7f [https://dl-cdn.alpinelinux.org/alpine/v3.15/community]
OK: 15847 distinct packages available
(1/9) Installing libgcc (10.3.1_git20211027-r0)
(2/9) Installing libstdc++ (10.3.1_git20211027-r0)
(3/9) Installing mpdecimal (2.5.1-r1)
(4/9) Installing python3 (3.9.7-r4)
(5/9) Installing py3-certifi (2020.12.5-r1)
(6/9) Installing py3-charset-normalizer (2.0.7-r0)
(7/9) Installing py3-idna (3.3-r0)
(8/9) Installing py3-urllib3 (1.26.7-r0)
(9/9) Installing py3-requests (2.26.0-r1)
Executing busybox-1.34.1-r3.trigger
OK: 64 MiB in 45 packages

/usr/src/app # python channels-dvr-gantt.py
Traceback (most recent call last):
File "/usr/src/app/channels-dvr-gantt.py", line 5, in
import requests
ModuleNotFoundError: No module named 'requests'

This isn't as easy and straightforward as I thought it would be.

Maybe need to use python3 channels-dvr-gantt.py

/usr/src/app # which python
/usr/local/bin/python

/usr/src/app # which python3
/usr/local/bin/python3

/usr/src/app # python --version
Python 3.10.1

/usr/src/app # python3 --version
Python 3.10.1

/usr/src/app # python3 channels-dvr-gantt.py
Traceback (most recent call last):
File "/usr/src/app/channels-dvr-gantt.py", line 5, in
import requests
ModuleNotFoundError: No module named 'requests'
:man_shrugging:

Sounds like you're not the only one: docker - Installed a python package from Alpine Repository, but not available in python - Stack Overflow

Ahh, good to know I'm not alone. Spent too much time on this today, will try a fresh start on it tomorrow.

@chDVRuser: Sorry this has been so difficult for you, and @tmm1: Thank you for helping out.

I'm going to attempt to create my first docker container for this tonight -- that should ease the pain for folks that can't dedicate as much time to these endeavors... will post back with the results.

Ugh. What Is Pip? A Guide for New Pythonistas – Real Python Hope I don't have to go down this road...

Probably worth adding a requirements.txt too

1 Like

This is now a Docker image, my github page has been updated...

1 Like

Thanks @ricm916

Now that I can actually use it, I really like it!

Nice to have a defined refresh (I'm using 600 seconds), otherwise by the time you scroll all the way to the
right the page refreshes and you're back at the upper left.

Also like the customizable color coded source devices.

Only have 2 suggestions.

Source Picker is displaying FriendlyName, but if someone has more than one (like HDHR tuners), they would need to know which one to pick. Suggest maybe display DeviceID or FriendlyName(DeviceID), like HDHomeRun PRIME(1323AADB).

Could you display the DAYS on the first row where the date changes. When scrolling (a lot) to the right, it's hard to tell at a glance where you're at (Day and Hour) in time.

Appreciate the feedback... FriendlyName(DeviceID) is a simple change... I didn't bother with putting the day and hour at the top, because hovering the pointer over any of the colored bars on the graph will pop up a tooltip showing the exact date and hours the bar represents... I will change the formatting on the date to include the day of week for easier reference... then look at labelling the top of the graph as a next step...

No need for that

That would be great

Don't know if this is a bug, but I've got two of your containers running, each looking at a different Channels DVR server. The time display is off to the right on one of them.
Screenshot 2022-01-09 at 11-57-23 Screenshot
Screenshot 2022-01-09 at 11-56-46 Screenshot

It appears you're overriding the assigned color scheme... in doing so, you're missing the reasoning for the time -- there's a vertical bar that shows you how far through each program the recording has progressed. As you change providers, and as time progresses, the time will move around indicating the current time relative to the program time. (See the last image I posted).