That sounds like a reasonable analysis. This is an obscure problem. Can we just use a workaround and call the two skins "Belchertown" and "Highcharts_Belchertown," or something similar?
BTW, Pat, how are you enjoying your new life as a maintainer of open source code? :-) -tk On Thu, Sep 6, 2018 at 1:56 AM gjr80 <[email protected]> wrote: > Yep, did the same for me. Wanted to understand why WeeWX-WD never had the > problem, first thought was what user was running wee_extension, dead end. > Then I wondered if the json sub-directory was doing it. I had a quick look > at the extension.py code, I hadn't come across os.path.commonprefix() > before so googled it. os.path.commonprefix() checks a list of paths and > returns the longest common prefix and it does this by doing a > character-by-character comparison, when I saw the warning that it could > return invalid paths that peaked my curiosity. In the case of your > extension /home/weewx/skins/Belchertown is the result, so extension.py > then works from /home/weewx/skins/Belchertown down and thus > /home/weewx/skins/Belchertown_Highcharts is ignored. I did some rejigging > of your extension so that it used > /home/weewx/skins/ZBelchertown_Highcharts instead and it worked fine. > That explains why WeeWX-WD was never affected, all of its skin directory > names had no common prefix. Probably more correctly (and I didn't check > this) but the fact that the common prefix includes the name of one of the > skin directories (Belchertown) may be the cause. > > No matter, its a bug that needs to be fixed. Can't comment on the proposed > fix, better for Tom or Matthew I think. > > Gary >
