I am getting errors reading files when running pywws-hourly. pywws-hourly -vvv ~/weather/data. If I use sudo it fails differently.
08:13:28:pywws.logdata:Fetching data
08:13:28:pywws.logdata:1 catchup records
08:13:28:pywws.process:Generating summary data
08:13:28:pywws.calib:Using default calibration
08:13:28:pywws.process:daily: 2020-12-08 09:00:00
08:13:28:pywws.process:monthly: 2020-12-01 09:00:00
08:13:28:pywws.regulartasks:doing task sections ['logged', 'hourly', 'daily', '12 hourly']
08:13:28:pywws.regulartasks:Graphing 7days.png.xml
08:13:28:pywws.storage:flushing
Traceback (most recent call last):
File "/usr/local/bin/pywws-hourly", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/pywws/hourly.py", line 97, in main
return hourly(args[0])
File "/usr/local/lib/python2.7/dist-packages/pywws/hourly.py", line 68, in hourly
pywws.regulartasks.RegularTasks(context).do_tasks()
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python2.7/dist-packages/pywws/storage.py", line 271, in pywws_context
ctx.flush()
File "/usr/local/lib/python2.7/dist-packages/pywws/storage.py", line 259, in flush
self.hourly_data.flush()
File "/usr/local/lib/python2.7/dist-packages/pywws/filedata.py", line 375, in flush
self._flush(self._wr_cache)
File "/usr/local/lib/python2.7/dist-packages/pywws/filedata.py", line 404, in _flush
with open(cache.path, **kwds) as csvfile:
IOError: [Errno 13] Permission denied: '/home/pi/weather/data/hourly/2020/2020-12/2020-12-09.txt'
pi@raspberrypi:~/weather/data/calib/2020/2020-12 $ cd ~/weather/data/hourly/2020/2020-12
pi@raspberrypi:~/weather/data/hourly/2020/2020-12 $ ls
2020-12-01.txt 2020-12-02.txt 2020-12-03.txt 2020-12-04.txt 2020-12-05.txt 2020-12-06.txt 2020-12-07.txt 2020-12-08.txt 2020-12-09.txt
pi@raspberrypi:~/weather/data/hourly/2020/2020-12 $ ls -alt
total 44
drwxrwxrwx 2 root root 4096 Dec 9 08:00 .
-rw-r--r-- 1 root root 484 Dec 9 08:00 2020-12-09.txt
-rwxrwxrwx 1 pi weather 1451 Dec 9 08:00 2020-12-08.txt
-rwxrwxrwx 1 pi weather 1443 Dec 8 07:28 2020-12-07.txt
-rwxrwxrwx 1 pi weather 1459 Dec 7 15:07 2020-12-06.txt
-rwxrwxrwx 1 pi weather 1749 Dec 6 14:28 2020-12-05.txt
-rwxrwxrwx 1 pi weather 1815 Dec 6 14:28 2020-12-04.txt
-rwxrwxrwx 1 pi weather 1721 Dec 4 07:27 2020-12-03.txt
-rwxrwxrwx 1 pi weather 1573 Dec 3 12:56 2020-12-02.txt
-rwxrwxrwx 1 pi weather 1515 Dec 2 09:12 2020-12-01.txt
drwxrwxrwx 4 root root 4096 Dec 1 09:58 ..
I manually changed user and group for files shown uo to yesterday then ran pywws-houly and todays files written as root root. This then fails later in the program.
This also happens with Calib files and raw files. PI user is part of sudo, weather and other groups. I am running pi headless and executing .bashrc. I seem to have sone inconsistent results from commands when using sudo and not.