Update, after an extensive search of my environment, I have found a hidden 
directory that I can't access called 
Weewx/bin.20200217183229/pip/_internal/utils which contains a file 
packaging.py
This is the only file in my environment that contains the string NoneType 
and when I edit this file I find the following and have posted the entire 
function in case this means something to a Python coder

def get_metadata(dist):
    # type: (Distribution) -> Message
    """
    :raises NoneMetadataError: if the distribution reports `has_metadata()`
        True but `get_metadata()` returns None.
    """
    metadata_name = 'METADATA'
    if (isinstance(dist, pkg_resources.DistInfoDistribution) and
            dist.has_metadata(metadata_name)):
        metadata = dist.get_metadata(metadata_name)
    elif dist.has_metadata('PKG-INFO'):
        metadata_name = 'PKG-INFO'
        metadata = dist.get_metadata(metadata_name)
    else:
        logger.warning("No metadata found in %s", 
display_path(dist.location))
        metadata = ''

    if metadata is None:
        raise NoneMetadataError(dist, metadata_name)

    feed_parser = FeedParser()
    # The following line errors out if with a "NoneType" TypeError if
    # passed metadata=None.
    feed_parser.feed(metadata)
    return feed_parser.close()






On Sunday, March 8, 2020 at 9:21:06 AM UTC, Mike Revitt wrote:
>
> I am having a really strange behaviour at the moment, which I thought I 
> have fixed but it came back yesterday.
>
> Occasionally Weewx will stop with no errors, but not be doing anything and 
> when you do a status check it shows that the process has died.
>
> pi@raspberrypi:/home/weewx $ sudo /etc/init.d/weewx status
> ● weewx.service - LSB: weewx weather system
>    Loaded: loaded (/etc/init.d/weewx; generated)
>    Active: active (exited) since Sat 2020-03-07 08:24:46 GMT; 24h ago
>      Docs: man:systemd-sysv-generator(8)
>   Process: 13209 ExecStart=/etc/init.d/weewx start (code=exited, 
> status=0/SUCCESS)
>
> Mar 07 11:55:22 raspberrypi weewxd[13224]: weewx[13224] INFO 
> botocore.credentials: Found credentials in shared credentials…edentials
> Mar 07 11:55:57 raspberrypi weewxd[13224]: weewx[13224] INFO 
> user.s3backup: S3BackupGenerator: S3 copied files to S3 in 0 …7 seconds
> Mar 07 12:00:16 raspberrypi weewxd[13224]: weewx[13224] INFO 
> weewx.manager: Added record 2020-03-07 12:00:00 GMT (15835824…eewx.sdb'
> Mar 07 12:00:16 raspberrypi weewxd[13224]: weewx[13224] INFO 
> weewx.manager: Added record 2020-03-07 12:00:00 GMT (15835824…eewx.sdb'
> Mar 07 12:00:18 raspberrypi weewxd[13224]: weewx[13224] INFO 
> weewx.cheetahgenerator: Generated 7 files for report SeasonsR…0 seconds
> Mar 07 12:00:23 raspberrypi weewxd[13224]: weewx[13224] INFO 
> weewx.imagegenerator: Generated 27 images for report SeasonsR…1 seconds
> Mar 07 12:00:23 raspberrypi weewxd[13224]: weewx[13224] INFO 
> weewx.reportengine: Copied 0 files to /var/www/html/MountWeather
> Mar 07 12:00:23 raspberrypi weewxd[13224]: weewx[13224] INFO 
> botocore.credentials: Found credentials in shared credentials…edentials
> Mar 07 12:00:29 raspberrypi weewxd[13224]: weewx[13224] INFO 
> user.s3upload: S3UploadGenerator: AWS-S3 copied 34 files to S…0 seconds
> Mar 07 12:00:30 raspberrypi weewxd[13224]: weewx[13224] INFO 
> botocore.credentials: Found credentials in shared credentials…edentials
>
>
> Then when I restart weewx I get the following error
>
> pi@raspberrypi:/home/weewx $ sudo /etc/init.d/weewx status
> ● weewx.service - LSB: weewx weather system
>    Loaded: loaded (/etc/init.d/weewx; generated)
>    Active: active (running) since Sun 2020-03-08 08:45:32 GMT; 14min ago
>      Docs: man:systemd-sysv-generator(8)
>   Process: 29330 ExecStart=/etc/init.d/weewx start (code=exited, 
> status=0/SUCCESS)
>     Tasks: 2 (limit: 2200)
>    Memory: 42.2M
>    CGroup: /system.slice/weewx.service
>            └─29345 /usr/bin/python /home/weewx/bin/weewxd --daemon 
> --pidfile=/var/run/weewx.pid /home/weewx/weewx.conf
>
> Mar 08 09:00:16 raspberrypi weewxd[29345]: weewx[29345] INFO 
> weewx.manager: Added record 2020-03-08 09:00:00 GMT (1583658000) to daily 
> summary in 'weewx.sdb'
> Mar 08 09:00:16 raspberrypi weewxd[29345]: weewx[29345] ERROR 
> weewx.cheetahgenerator: Generate failed with exception '<class 'TypeError'>'
> Mar 08 09:00:16 raspberrypi weewxd[29345]: weewx[29345] ERROR 
> weewx.cheetahgenerator: **** Ignoring template 
> /home/weewx/skins/Seasons/index.html.tmpl
> Mar 08 09:00:16 raspberrypi weewxd[29345]: weewx[29345] ERROR 
> weewx.cheetahgenerator: **** Reason: '>' not supported between instances of 
> 'NoneType' and 'float'
> Mar 08 09:00:16 raspberrypi weewxd[29345]: weewx[29345] ERROR 
> weewx.cheetahgenerator: ****  Traceback (most recent call last):
> Mar 08 09:00:16 raspberrypi weewxd[29345]: weewx[29345] ERROR 
> weewx.cheetahgenerator: ****    File 
> "/home/weewx/bin/weewx/cheetahgenerator.py", line 322, in generate
> Mar 08 09:00:16 raspberrypi weewxd[29345]: weewx[29345] ERROR 
> weewx.cheetahgenerator: ****      unicode_string = 
> compiled_template.respond()
> Mar 08 09:00:16 raspberrypi weewxd[29345]: weewx[29345] ERROR 
> weewx.cheetahgenerator: ****    File 
> "_home_weewx_skins_Seasons_index_html_tmpl.py", line …, in respond
> Mar 08 09:00:16 raspberrypi weewxd[29345]: weewx[29345] ERROR 
> weewx.cheetahgenerator: ****  TypeError: '>' not supported between 
> instances of 'NoneType' and 'float'
> Mar 08 09:00:16 raspberrypi weewxd[29345]: weewx[29345] INFO 
> weewx.cheetahgenerator: Generated 6 files for report SeasonsReport in 1.50 
> seconds
> Mar 08 09:00:21 raspberrypi weewxd[29345]: weewx[29345] INFO 
> weewx.imagegenerator: Generated 27 images for report SeasonsReport in 4.65 
> seconds
> Mar 08 09:00:21 raspberrypi weewxd[29345]: weewx[29345] INFO 
> weewx.reportengine: Copied 0 files to /var/www/html/MountWeather
> Hint: Some lines were ellipsized, use -l to show in full.
>
>
> I have compared index.html.tmpl to the original and it is identical as is 
>  cheetahgenerator.py
>
> I have got this working again in the past by simply copying my modified 
> files back to the Raspberry Pi and restarting the process, but this doesn't 
> make any sense as I can't find anything that is different. Currently trying 
> to pin this down to a reproducible case but an help appreciated here as I 
> can't find the file _home_weewx_skins_Seasons_index_html_tmpl.py which 
> appears to be the source of the problem
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/4dc91f1c-8318-41b3-a245-b65dcad28b2f%40googlegroups.com.

Reply via email to