The user which is running weewx has to have write access both to the database file and the containing folder. Furthermore, no other process can have the database open for writing at the same time. mihec schrieb am Montag, 23. Dezember 2024 um 10:43:15 UTC+1:
> Latest status: I've upgraded to weewx 5.1 and set python3 as default. I > think everything should be operational except the weewx does not have write > permissions to the existing weewx.sdb. I've attached complete startup log. > I really appreciate your help since the station is now not operational... > Thanks! > Dec 23 10:34:11 vreme-Solkan-master systemd[1]: Started WeeWX. > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: > Initializing weewxd version 5.1.0 > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: Command > line: /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: Using > Python: 3.7.3 (default, Apr 3 2019, 05:39:12) #012[GCC 8.2.0] > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: Located > at: /usr/bin/python3 > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: > Platform: Linux-4.19.66-v7+-armv7l-with-debian-10.0 > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: Locale: > 'sl_SI.UTF-8' > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: Entry > path: /usr/share/weewx/weewxd.py > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: > WEEWX_ROOT: /etc/weewx > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: Config > file: /etc/weewx/weewx.conf > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: User > module: /etc/weewx/bin/user > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: Debug: > 1 > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: User: > weewx > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: Group: > weewx > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO __main__: Groups: > dialout weewx > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG __main__: > loop_on_init: False > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG __main__: > Initializing engine > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO weewx.engine: > Loading station type Vantage (weewx.drivers.vantage) > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG > weewx.drivers.vantage: Driver version is 3.6.2 > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG > weewx.drivers.vantage: Option loop_request=1 > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG > weewx.drivers.vantage: Opened up serial port /dev/ttyUSB0; baud 19200; > timeout 4.00 > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG > weewx.drivers.vantage: Successfully woke up Vantage console > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG > weewx.drivers.vantage: Hardware type is 17 > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG > weewx.drivers.vantage: ISS ID is 1 > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG > weewx.drivers.vantage: Hardware name: Vantage Vue > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Loading service weewx.engine.StdTimeSynch > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Finished loading service weewx.engine.StdTimeSynch > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Loading service user.strele.streleservice > Dec 23 10:34:12 vreme-Solkan-master /weewxd.py: strele: using > /home/pi/weewx/html/strele2.txt > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Finished loading service user.strele.streleservice > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Loading service user.tempjar.tempjarservice > Dec 23 10:34:12 vreme-Solkan-master /weewxd.py: tempJar: using > /home/pi/weewx/html/extraTemp1.txt > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Finished loading service user.tempjar.tempjarservice > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Loading service user.solarjar.solarjarservice > Dec 23 10:34:12 vreme-Solkan-master /weewxd.py: solarJar: using > /home/pi/weewx/html/solar.txt > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Finished loading service user.solarjar.solarjarservice > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Loading service user.aqi.AQIservice > Dec 23 10:34:12 vreme-Solkan-master /weewxd.py: AQI: using > /home/pi/weewx/html/aqi.txt > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Finished loading service user.aqi.AQIservice > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Loading service user.soil.Soilservice > Dec 23 10:34:12 vreme-Solkan-master /weewxd.py: Temperatura tal: using > /home/pi/weewx/html/soiltemp.txt > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Finished loading service user.soil.Soilservice > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Loading service user.temp_pisarna.Pisarnaservice > Dec 23 10:34:12 vreme-Solkan-master /weewxd.py: Temperatura v pisarni: > /home/pi/data/ITtemp.txt > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Finished loading service user.temp_pisarna.Pisarnaservice > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Loading service weewx.engine.StdConvert > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO weewx.engine: > StdConvert target unit is 0x1 > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Finished loading service weewx.engine.StdConvert > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Loading service weewx.engine.StdCalibrate > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Finished loading service weewx.engine.StdCalibrate > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Loading service weewx.engine.StdQC > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Finished loading service weewx.engine.StdQC > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.engine: > Loading service weewx.wxservices.StdWXCalculate > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO weewx.wxservices: > StdWXCalculate will use data binding wx_binding > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.manager: > Daily summary version is 2.0 > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO weewx.manager: > Daily summaries at V2.0. Patching to V4.0 > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: INFO weewx.manager: > recalculate_weights: Using database 'weewx.sdb' > Dec 23 10:34:12 vreme-Solkan-master weewxd[12090]: DEBUG weewx.manager: > recalculate_weights: Tranche size 100 > Dec 23 10:34:15 vreme-Solkan-master weewxd[12090]: CRITICAL __main__: > Database OperationalError exception: attempt to write a readonly database > Dec 23 10:34:15 vreme-Solkan-master weewxd[12090]: CRITICAL __main__: > **** Waiting 2 minutes then retrying... > > This is my database file: > -rwxrwxrwx 1 weewx weewx 682086400 dec 23 08:57 weewx.sdb > > I also tried with pi:root or root:root but none of the options worked. > > ponedeljek, 23. december 2024 ob 09:34:05 UTC+1 je oseba mihec napisala: > >> Thanks both for your advice. I decided to do a weewx upgrade before I >> read you last two posts... It has not progressed OK and now I'm stuck with >> some strange error due to modified schema in the weewx.sdb file. I moved to >> weewx 4.10. I'm trying to solve this now... >> >> petek, 20. december 2024 ob 20:04:39 UTC+1 je oseba Tom Keffer napisala: >> >>> Ah, yes! That would explain the symptoms. I forgot that Peter had >>> upgraded neowx. >>> >>> Peter: I think Vince is right: the modern neowx skin depends on a modern >>> version of WeeWX. >>> >>> On Fri, Dec 20, 2024 at 10:53 AM vince <vince...@gmail.com> wrote: >>> >>>> Sure, but 3.9 doesn't know of the newer %Y syntax that the current >>>> (new) skin that is failing uses. >>>> >>>> He can: >>>> >>>> - hack the new/current version of the skin to use the old YYYY >>>> format that 3.9 knows of >>>> - Or go back to running the old skin on the old weewx >>>> - Or better yet get current and run v5 weewx and the new skin that >>>> matches it >>>> >>>> But old weewx and new format template naming isn't gonna work. Weewx >>>> is backward compatible, but it's not forward compatible. >>>> >>>> On Friday, December 20, 2024 at 10:41:01 AM UTC-8 Tom Keffer wrote: >>>> >>>>> You remember right, except that the old 'YYYY', 'MM', etc., names are >>>>> still honored. >>>>> >>>>> Besides, he has not upgraded his copy of WeeWX. He's still on V3.9. >>>>> >>>>> On Fri, Dec 20, 2024 at 9:29 AM vince <vince...@gmail.com> wrote: >>>>> >>>>>> "*My suspicion is that weewx is not handling the %Y and %Y-%m >>>>>> template files properly."* >>>>>> >>>>>> Tom - it's been literally years, but I remember some kind of breaking >>>>>> change that happened along those lines way back when and the fix was to >>>>>> rename filenames on the template files in pre-existing skins. >>>>>> >>>>>> FWIW - surfing the neowx github site(s), the old original neowx skin >>>>>> file names in the format of "NOAA-YYYY-MM.txt.tmpl >>>>>> <https://github.com/neoground/neowx/blob/master/src/NOAA/NOAA-YYYY-MM.txt.tmpl>" >>>>>> >>>>>> and the like. The new ones uses the % syntax for year/month in the >>>>>> filename name. My very hazy recollection is that at some point in time >>>>>> I >>>>>> had to rename things in old skins to use the new syntax. >>>>>> >>>>>> My guess (guess) is that to use the new neowx skin on the old weewx >>>>>> he has to rename the neowx templates the other way to use the old syntax >>>>>> for file naming. >>>>>> >>>>>> From the install.py file for the current neowx: >>>>>> 'skins/neowx-material/archive/NOAA-%Y.txt.tmpl', >>>>>> 'skins/neowx-material/archive/NOAA-%Y-%m.txt.tmpl' >>>>>> >>>>>> For the new skin on old ancient weewx, I'd try renaming them to the >>>>>> old filename syntax ala: >>>>>> 'skins/neowx-material/archive/NOAA-YYYY.txt.tmpl', >>>>>> 'skins/neowx-material/archive/NOAA-YYYY-MM.txt.tmpl' >>>>>> >>>>>> Worst that happens is it doesn't work :-) >>>>>> >>>>>> -- >>>>>> 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 weewx-user+...@googlegroups.com. >>>>>> >>>>> To view this discussion visit >>>>>> https://groups.google.com/d/msgid/weewx-user/998b9ae9-cf90-47c5-91c0-587f532d151dn%40googlegroups.com >>>>>> >>>>>> <https://groups.google.com/d/msgid/weewx-user/998b9ae9-cf90-47c5-91c0-587f532d151dn%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>>> 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 weewx-user+...@googlegroups.com. >>>> >>> To view this discussion visit >>>> https://groups.google.com/d/msgid/weewx-user/8dd66ca8-0222-4a2b-a1ad-32f16f03bf63n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/weewx-user/8dd66ca8-0222-4a2b-a1ad-32f16f03bf63n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- 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 weewx-user+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/weewx-user/3fac3ffd-2842-4aed-a099-dcc9c7231ab2n%40googlegroups.com.