Re: [Dorset] Cannot Set the Volume Using amixer under bullseye

2021-12-31 Thread Terry Coles
On Friday, 31 December 2021 17:40:58 GMT Patrick Wigmore wrote:
> This looks like it should be a valid command, based on the
> configuration you listed and according to the amixer man page that's
> in the Debian bullseye alsa-utils package.

It was certainly valid when I originally wrote it about 5 years ago!  It has 
worked throughout until this upgrade.

> Are you saying that the "amixer: Invalid command!" error is produced
> when you run that amixer command directly?
> 
> In other words, have you ruled out the possibility that the Python
> program has somehow begun to pass unexpected arguments to amixer?

Yes.  It fails from the shell and from the program.  In the Python program it 
is passed to the OS using:

subprocess.call(['amixer', '-c', '0', 'set', 'PCM', 'playback', tower_vol])

with tower_vol having been set previously.

As I say that line of code has worked for many years until now. 

(I dropped the 'playback in the command I gave in this thread because it was 
basically straight out of the man page.  It still fails if I add 'playback'.)

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Cannot Set the Volume Using amixer under bullseye

2021-12-31 Thread Patrick Wigmore
On Fri, 31 Dec 2021 16:21:34 +, Terry Coles wrote:
> I need the volume to be controllable from my Python program, so I
> set it once at the beginning when the program is launched, eg:
> 
> amixer -c 0 set PCM 100

This looks like it should be a valid command, based on the 
configuration you listed and according to the amixer man page that's 
in the Debian bullseye alsa-utils package.

That form of command works fine with amixer 1.1.8 on my laptop.

Are you saying that the "amixer: Invalid command!" error is produced 
when you run that amixer command directly?

In other words, have you ruled out the possibility that the Python 
program has somehow begun to pass unexpected arguments to amixer?

Patrick



-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Cannot Set the Volume Using amixer under bullseye

2021-12-31 Thread Terry Coles
On Friday, 31 December 2021 17:03:07 GMT PeterMerchant wrote:
> On my desktop  (Kubuntu 20.04)
> 
> Amixer gives:
> 
> peterm@peterm-MBB-34204H:~$ amixer
> Simple mixer control 'Master',0
>Capabilities: pvolume
>Playback channels: Front Left - Front Right
>Limits: Playback 0 - 31
>Mono:
>Front Left: Playback 31 [100%]
>Front Right: Playback 31 [100%]
> Simple mixer control '3D Control - Switch',0
>Capabilities: pswitch pswitch-joined
>Playback channels: Mono
>Mono: Playback [off]
> Simple mixer control 'PCM',0
>Capabilities: pvolume pswitch pswitch-joined cswitch
>Playback channels: Front Left - Front Right
>Capture channels: Front Left - Front Right
>Limits: Playback 0 - 31
>Front Left: Playback 24 [77%] [on] Capture [off]
>Front Right: Playback 24 [77%] [on] Capture [off]
> Simple mixer control 'Synth',0
> ..   and a whole bunch more
> 
> I notice that the setup is different.  Does it need to be 'pvolume' in
> yours?
 
The thing is Peter, command amixer without any parameters simply lists what 
devices the machine has and what the alsa capabilities are for each device.  
Your PCM sound device has the capability 'pvolume' and mine only has 'volume'.

AFAIK, I can't change those capabilities because they relate to the hardware 
installed.

Don't forget that this code worked before I upgraded to bullseye.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Cannot Set the Volume Using amixer under bullseye

2021-12-31 Thread PeterMerchant

On 31/12/2021 16:21, Terry Coles wrote:

I'm beginning to think that upgrading the music and bells Pis to bullseye
might have been a bit premature.  I cannot get amixer to work properly. The
sound card is an Adafruit Speaker Bonnet. The code shown below worked under
buster.

Here is the configuration:

pi@minster-bells:~ $ amixer
Simple mixer control 'PCM',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 255
Front Left: 255 [100%]
Front Right: 255 [100%]

I need the volume to be controllable from my Python program, so I set it once
at the beginning when the program is launched, eg:

amixer -c 0 set PCM 100

(where the value is a variable in reality, but this doesn't work either.)

I get:

amixer: Invalid command!

Any thoughts on what could be wrong? speaker-test and playing an mp3 file works
fine using mpg123. I just can't set the volume.


On my desktop  (Kubuntu 20.04)

Amixer gives:

peterm@peterm-MBB-34204H:~$ amixer
Simple mixer control 'Master',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%]
  Front Right: Playback 31 [100%]
Simple mixer control '3D Control - Switch',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined cswitch
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 24 [77%] [on] Capture [off]
  Front Right: Playback 24 [77%] [on] Capture [off]
Simple mixer control 'Synth',0
..   and a whole bunch more

I notice that the setup is different.  Does it need to be 'pvolume' in yours?

Peter


--
 Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


[Dorset] Cannot Set the Volume Using amixer under bullseye

2021-12-31 Thread Terry Coles
I'm beginning to think that upgrading the music and bells Pis to bullseye 
might have been a bit premature.  I cannot get amixer to work properly. The 
sound card is an Adafruit Speaker Bonnet. The code shown below worked under 
buster.

Here is the configuration:

pi@minster-bells:~ $ amixer
Simple mixer control 'PCM',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 255
Front Left: 255 [100%]
Front Right: 255 [100%]

I need the volume to be controllable from my Python program, so I set it once 
at the beginning when the program is launched, eg:

amixer -c 0 set PCM 100

(where the value is a variable in reality, but this doesn't work either.)

I get:

amixer: Invalid command!

Any thoughts on what could be wrong? speaker-test and playing an mp3 file works 
fine using mpg123. I just can't set the volume.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Terry Coles
Stephen,

On Friday, 31 December 2021 12:29:40 GMT Stephen Wolff wrote:
> I think ipython is a distraction. How do you run your program? Is it with
> 
> python app.py

No.  I have:

#!/usr/bin/env python3

as the first line in the program, the file is made executable and I launch it 
with:

./minsterbells.py

which I place in .bashrc.

> If so what do you get when you do
> 
> python
> 
> (To bring up python command line, it’ll say which version of python you’re
> running)

pi@minster-bells:~ $ python
Python 3.9.2 (default, Mar 12 2021, 04:06:34) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Stephen Wolff
Hi terry, 

I think ipython is a distraction. How do you run your program? Is it with 

python app.py 

If so what do you get when you do

python

(To bring up python command line, it’ll say which version of python you’re 
running)

> On 31 Dec 2021, at 11:51, Terry Coles  wrote:
> 
> On Friday, 31 December 2021 10:41:16 GMT Terry Coles wrote:
>> Is there any penalty in getting several hundred kilobytes of Warnings
>> written to the console 24/7?
> 
> OK.  I've searched through /var/log/ and there doesn't seem to be any entries 
> to any of the logs that were written the last time I ran the program.  From 
> that, I'm assuming that 'used' lines in the console are simply thrown away 
> when they scroll off the screen.
> 
> Is that right?  If it is, then the only penalty that I can think of is the 
> difficulty debugging errors which are likely to get lost amongst all the 
> reams 
> of Warnings.
> 
> -- 
> 
> 
> 
>Terry Coles
> 
> 
> 
> -- 
>  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
>  Check to whom you are replying
>  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
>  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Terry Coles
On Friday, 31 December 2021 10:41:16 GMT Terry Coles wrote:
> Is there any penalty in getting several hundred kilobytes of Warnings
> written to the console 24/7?

OK.  I've searched through /var/log/ and there doesn't seem to be any entries 
to any of the logs that were written the last time I ran the program.  From 
that, I'm assuming that 'used' lines in the console are simply thrown away 
when they scroll off the screen.

Is that right?  If it is, then the only penalty that I can think of is the 
difficulty debugging errors which are likely to get lost amongst all the reams 
of Warnings.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Keith Edmunds
OK, so we've fixed the "I can't install zoneinfo" problem. I'll let
someone else battle whatever the remaining problem is.
-- 
Great music, chat and even some wit.
Join me every Friday evening at 8pm for
Keith's Music Box:

Follow: https://www.facebook.com/KMBEngland
On Friday go to: https://www.mixcloud.com/live/KeithsMusicBox/

-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Terry Coles
On Friday, 31 December 2021 10:42:08 GMT Keith Edmunds wrote:
> > No specific new error, just thsame as before.
> 
> Terry, I'm trying to help you here but you need to help me. Let's try one
> more time: what error do you get when you try to import zoneinfo?

Keith,

I hadn't tried to run it using ipython3; I was simply running my program and 
got no new errors; it wouldn't see below.
 
> I get this:
> 
> $ ipython3
> Python 3.9.2 (default, Feb 28 2021, 17:03:44)
> Type 'copyright', 'credits' or 'license' for more information
> IPython 7.20.0 -- An enhanced Interactive Python. Type '?' for help.
> 
> In [1]: import zoneinfo
> 
> In [2]:

I installed ipython3 (lots of new stuff).

I got:

pi@minster-bells:~ $ ipython3
Python 3.9.2 (default, Mar 12 2021, 04:06:34) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.20.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import zoneinfo

In [2]: 

In other words, the same as you.

It would appear that the problem is in tzlocal, (see my other responses) so 
I'm wondering whether to downgrade or live with the Warnings.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Keith Edmunds
> No specific new error, just thsame as before.

Terry, I'm trying to help you here but you need to help me. Let's try one
more time: what error do you get when you try to import zoneinfo?

I get this:

$ ipython3 
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.20.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import zoneinfo

In [2]: 

-- 
Great music, chat and even some wit.
Join me every Friday evening at 8pm for
Keith's Music Box:

Follow: https://www.facebook.com/KMBEngland
On Friday go to: https://www.mixcloud.com/live/KeithsMusicBox/

-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Terry Coles
On Friday, 31 December 2021 10:26:25 GMT Terry Coles wrote:
> The issue has been under discussion on the apscheduler github site:
> 
> https://github.com/agronholm/apscheduler/discussions/570
> 
> The question is should I wait awhile or downgrade  tzlocal to 2.x as
> suggested in that discussion.  I'm wary of downgrading things because any
> future updates may be locked out.

agronholm also says:

You can either (safely) ignore those warnings or...

Is there any penalty in getting several hundred kilobytes of Warnings written 
to the console 24/7?

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Terry Coles
On Friday, 31 December 2021 10:38:30 GMT Keith Edmunds wrote:
> I read all the replies in this thread but didn't see what error you got
> when you tried to import zoneinfo.

Sorry, I misread your question.  No specific new error, just thsame as before.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Keith Edmunds
I read all the replies in this thread but didn't see what error you got
when you tried to import zoneinfo.
-- 
Great music, chat and even some wit.
Join me every Friday evening at 8pm for
Keith's Music Box:

Follow: https://www.facebook.com/KMBEngland
On Friday go to: https://www.mixcloud.com/live/KeithsMusicBox/

-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Terry Coles
On Friday, 31 December 2021 10:34:08 GMT Keith Edmunds wrote:
> What error do you get?

See my response to Hamish.


-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Keith Edmunds
> when I tried to install zoneinfo it failed 

zoneinfo is part of the Python Standard Library, so you shouldn't need to
install it.

>   from zoneinfo import ZoneInfo 
> 
> to the program and still got the error.

What error do you get?
-- 
Great music, chat and even some wit.
Join me every Friday evening at 8pm for
Keith's Music Box:

Follow: https://www.facebook.com/KMBEngland
On Friday go to: https://www.mixcloud.com/live/KeithsMusicBox/

-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Terry Coles
On Friday, 31 December 2021 10:07:02 GMT Hamish McIntyre-Bhatty wrote:
> Sounds a bit complicated!

Yes.  I found it a bit impenetrable with multiple ways to fix the problem.

> What error(s) did you get when trying to install zoneinfo? Also which
> ways did you try (pip, setup.py install, something else?)?

I only used pip3:

pi@minster-bells:~ $ pip3 install zoneinfo
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
ERROR: Could not find a version that satisfies the requirement zoneinfo
ERROR: No matching distribution found for zoneinfo

I'm not sure that getting this to install would actually help.  I added:

  from zoneinfo import ZoneInfo 

to the program and still got the error.

Presumably, if this isn't fixed then it would affect all the other Pis at WMT 
when we upgrade them from buster.

Having said that, I would rather hope that it will be fixed in due course.  The 
issue has been under discussion on the apscheduler github site:

https://github.com/agronholm/apscheduler/discussions/570

The question is should I wait awhile or downgrade  tzlocal to 2.x as suggested 
in that discussion.  I'm wary of downgrading things because any future updates 
may be locked out.


-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Hamish McIntyre-Bhatty

On 31/12/2021 09:30, Terry Coles wrote:

Hi,

I've posted this query on the Raspberry Pi Forums, but with no response so
far.

As many of you are aware, I've been busy making changes to the hardware of the
Music and Bells Player at the WMT.  At the same time I've taken the
opportunity to upgrade the OS to bullseye, which I suspect has some bearing on
the issue that I've just encountered.  The software to control the playing of
the bells and chimes is written in Python and although the code I wrote last
year is unchanged, the Python version has been upgraded to Version 3.9 as part
of the changes introduced by bullseye.

When I run my Bells program I get this error, which repeats every few seconds:

/home/pi/.local/lib/python3.9/site-packages/apscheduler/util.py:95:
PytzUsageWarning: The zone attribute is specific to pytz's interface; please
migrate to a new time zone provider. For more details on how to do so, see
https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html]

BTW, the program still plays the bells when needed.  I use apscheduler in the
program to schedule a number of events:

def chimes_schedule():  # Schedule functions to be run and start the scheduler
 sched.add_job(hours, 'cron', hour='10')
 sched.add_job(hours, 'cron', hour='11')
 sched.add_job(hours, 'cron', hour='12')
 sched.add_job(hours, 'cron', hour='13')
 sched.add_job(hours, 'cron', hour='14')
 sched.add_job(hours, 'cron', hour='15')
 sched.add_job(hours, 'cron', hour='16')
 sched.add_job(hours, 'cron', hour='17')
 sched.add_job(hours, 'cron', hour='18')
 sched.add_job(hours, 'cron', hour='19')
 sched.add_job(hours, 'cron', hour='20')
 sched.add_job(hours, 'cron', hour='21')
 sched.add_job(hours, 'cron', hour='22')
 sched.add_job(resetnormalopening, 'cron', hour='23')
 sched.add_job(shutdown, 'cron', minute='1')
 sched.add_job(quarters, 'cron', minute='15')
 sched.add_job(quarters, 'cron', minute='30')
 sched.add_job(quarters, 'cron', minute='45')
 sched.add_job(check_minstermusic_commands, 'interval', seconds=1,
id='check_minstermusic_commands')

 sched.start()

The procedure chimes_schedule() is called once at the beginning of the
program.

On visiting the link given in the error message 
(https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html), I've 
found that the strategy to
migrate from pytz is outlined, with 'zoneinfo' being the preferred route.
However, when I tried to install zoneinfo it failed and I had to install
'backports.zoneinfo' instead.  However, I still couldn't make it work and am
not encouraged by:

Support for backports.zoneinfo in Python 3.9+ is currently minimal, since it
is expected that you would use the standard library zoneinfo module instead.

Can anyone help?

Would it be worth uninstalling Python 3.9 and installing an earlier version?


Sounds a bit complicated!

Once I've upgraded my pis to Bullseye I'll take a look.

What error(s) did you get when trying to install zoneinfo? Also which 
ways did you try (pip, setup.py install, something else?)?


Hamish


--
 Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


[Dorset] I'm Having Trouble with apscheduler and pytz Under bullseye

2021-12-31 Thread Terry Coles
Hi,

I've posted this query on the Raspberry Pi Forums, but with no response so 
far.

As many of you are aware, I've been busy making changes to the hardware of the 
Music and Bells Player at the WMT.  At the same time I've taken the 
opportunity to upgrade the OS to bullseye, which I suspect has some bearing on 
the issue that I've just encountered.  The software to control the playing of 
the bells and chimes is written in Python and although the code I wrote last 
year is unchanged, the Python version has been upgraded to Version 3.9 as part 
of the changes introduced by bullseye.

When I run my Bells program I get this error, which repeats every few seconds:

/home/pi/.local/lib/python3.9/site-packages/apscheduler/util.py:95: 
PytzUsageWarning: The zone attribute is specific to pytz's interface; please 
migrate to a new time zone provider. For more details on how to do so, see 
https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html]

BTW, the program still plays the bells when needed.  I use apscheduler in the 
program to schedule a number of events:

def chimes_schedule():  # Schedule functions to be run and start the scheduler
sched.add_job(hours, 'cron', hour='10')
sched.add_job(hours, 'cron', hour='11')
sched.add_job(hours, 'cron', hour='12')
sched.add_job(hours, 'cron', hour='13')
sched.add_job(hours, 'cron', hour='14')
sched.add_job(hours, 'cron', hour='15')
sched.add_job(hours, 'cron', hour='16')
sched.add_job(hours, 'cron', hour='17')
sched.add_job(hours, 'cron', hour='18')
sched.add_job(hours, 'cron', hour='19')
sched.add_job(hours, 'cron', hour='20')
sched.add_job(hours, 'cron', hour='21')
sched.add_job(hours, 'cron', hour='22')
sched.add_job(resetnormalopening, 'cron', hour='23')
sched.add_job(shutdown, 'cron', minute='1')
sched.add_job(quarters, 'cron', minute='15')
sched.add_job(quarters, 'cron', minute='30')
sched.add_job(quarters, 'cron', minute='45')
sched.add_job(check_minstermusic_commands, 'interval', seconds=1, 
id='check_minstermusic_commands')

sched.start()

The procedure chimes_schedule() is called once at the beginning of the 
program.

On visiting the link given in the error message 
(https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html), I've 
found that the strategy to 
migrate from pytz is outlined, with 'zoneinfo' being the preferred route. 
However, when I tried to install zoneinfo it failed and I had to install 
'backports.zoneinfo' instead.  However, I still couldn't make it work and am 
not encouraged by:

Support for backports.zoneinfo in Python 3.9+ is currently minimal, since it 
is expected that you would use the standard library zoneinfo module instead.

Can anyone help?

Would it be worth uninstalling Python 3.9 and installing an earlier version?

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk