Working directory and WeeWX observation

34 views
Skip to first unread message

bell...@gmail.com

unread,
Nov 5, 2020, 12:51:31 PM11/5/20
to weewx-user

As I was developing a service, I noticed that CheetahGenerator, ImageGenerator, CopyGenerator change the working directory to the directory of the skin that is being processed. This results in other threads ‘seeing’ the working directory change while skins are being processed. And after all skins are processed, the working directory is set to the last skin processed.

The fix to my service is easy, use absolute paths instead of relative (which is probably a best practice anyway). But, I thought I would pass this along in case it could save anyone some debugging time and effort. 

I suppose if another thread changed the working directory it could cause unexpected results in these generators. But the window of time where this could happen is pretty small.

rich

Reply all
Reply to author
Forward
0 new messages