service.copy not working after migration to new Raspberry PI

28 views
Skip to first unread message

runge....@googlemail.com

unread,
Feb 10, 2023, 6:25:29 PM2/10/23
to pywws
Hi,

i migrated to a new Raspberry PI.
I installed pywws according to documentation.
I just copied weather.ini from the old machine.

Sadly the copy service was not executed.

So i zipped the weather directory (with user right) and extracted it on the new Raspberry.

But the result was the same :-(

I have even build pywws from git, but same result.

The log is strange it has a line 
2023-02-11 00:11:09:pywws.service.copy:OK

But afterward, copy is not executed as before, and no log lines 
2023-02-10 16:47:22:pywws.service.copy:1 upload
like it was before.

As attachment my ini file and a old and new log.

I tried all I could imagine but do not find a solution.
Hope you can help me.

Thanks and best regards,
Stefan



weather.ini
oldlogfile.log
newlogfile.log

runge....@googlemail.com

unread,
Feb 10, 2023, 6:32:30 PM2/10/23
to pywws
Ok, i downgraded to 22.9.0 and it works again.
Seems to be a bug in 22.10.0

Best regards,
Stefan

Jim Easterbrook

unread,
Feb 11, 2023, 4:41:54 AM2/11/23
to py...@googlegroups.com
On 10/02/2023 23:25, 'runge....@googlemail.com' via pywws wrote:
>
> I have even build pywws from git, but same result.
>
> The log is strange it has a line
> 2023-02-11 00:11:09:pywws.service.copy:OK
>
> But afterward, copy is not executed as before, and no log lines
> 2023-02-10 16:47:22:pywws.service.copy:1 upload
> like it was before.

All the services only report status if it changes. so an initial 'OK'
and then no more messages is entirely normal.

--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>

Jim Easterbrook

unread,
Feb 11, 2023, 4:44:09 AM2/11/23
to py...@googlegroups.com
On 10/02/2023 23:32, 'runge....@googlemail.com' via pywws wrote:
> Ok, i downgraded to 22.9.0 and it works again.
> Seems to be a bug in 22.10.0

I did change all the services between 22.9.0 and 22.10.0 so that some of
them can report errors opening a "session". The changes to service.copy
are consistent with the changes to other services so I didn't expect any
problems.

I'll investigate further.

Jim Easterbrook

unread,
Feb 11, 2023, 4:50:21 AM2/11/23
to py...@googlegroups.com
On 11/02/2023 09:43, Jim Easterbrook wrote:
> On 10/02/2023 23:32, 'runge....@googlemail.com' via pywws wrote:
>> Ok, i downgraded to 22.9.0 and it works again.
>> Seems to be a bug in 22.10.0
>
> I did change all the services between 22.9.0 and 22.10.0 so that some of
> them can report errors opening a "session". The changes to service.copy
> are consistent with the changes to other services so I didn't expect any
> problems.
>
> I'll investigate further.

Doh! It's obvious what I did wrong as soon as I look:

The copy.py module has this:

def session(self):
yield None, 'OK'

The __init__.py module (that runs all services) has this:

with self.session() as (session, message):
if not session:
self.log(message)
while session and self.queue and not
self.context.shutdown.is_set():
...
Change that yield statement in copy.py to

def session(self):
yield True, 'OK'

and it should start working again.

runge....@googlemail.com

unread,
Feb 11, 2023, 10:36:56 AM2/11/23
to pywws
Hi Jim,

thank you.
I am happy you found it.
Will try the new version soon.

Thanks,
Stefan

Paul Cheffings

unread,
Mar 10, 2023, 10:17:56 AM3/10/23
to pywws
Hi

I have just updated my PYWWS version to 23.2.0 from 16.07.0 and none of my templates get copied to the webserver on the Pi. If I go back to version 22.9.0 all works correctly.

Cheers

Paul

Jim Easterbrook

unread,
Mar 10, 2023, 11:04:48 AM3/10/23
to py...@googlegroups.com
On 10/03/2023 15:16, Paul Cheffings wrote:
>
> I have just updated my PYWWS version to 23.2.0 from 16.07.0 and none of
> my templates get copied to the webserver on the Pi. If I go back to
> version 22.9.0 all works correctly.

Have you tried running the relevant service from the command line, with
plenty of verbosity, to find out what's going wrong?

Paul Cheffings

unread,
Mar 10, 2023, 11:42:27 AM3/10/23
to pywws
Hi

I did and it shows the service starting and immediately stopping without doing anything.

Changing to 22.9.0 it works straight away

Cheers

Paul

Jim Easterbrook

unread,
Mar 11, 2023, 9:02:43 AM3/11/23
to py...@googlegroups.com
On 10/03/2023 16:42, Paul Cheffings wrote:
>
> I did and it shows the service starting and immediately stopping without
> doing anything.
>
> Changing to 22.9.0 it works straight away

I've really no idea why this is happening. Obviously the solution for
you is to stay with the older version. Without a useful diagnostic
output I'm not able to work out what the problem might be.

Paul Cheffings

unread,
Mar 11, 2023, 10:54:33 AM3/11/23
to py...@googlegroups.com
Hi Jim

I know exactly what you mean but unfortunately that’s all it said. After the thread starting and stopping messages it gave the value -1.

Running the same in 22.9.0 logs the copying of the files to the website folder on the same Pi.

Cheers

Paul
--
You received this message because you are subscribed to a topic in the Google Groups "pywws" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pywws/UxojqOWEE5Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pywws+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/aa21835d-2737-3c66-7cb9-e99d0177195e%40jim-easterbrook.me.uk.
Reply all
Reply to author
Forward
0 new messages