Dear Developers
Windows 10 64Bit PyTROLL/SatPy has a severe problem with SATPY_CONFIG_PATH. I first heard of that bug here:
https://groups.io/g/MSG-1/topic/85002450#31749As I normally use PyTROLL/SatPy under Debian GNU/Linux I could not reproduce the problem. BACKGROUND INFO:
I wrote an EUMETCast PyTROLL/SatPy Starter Kit 3.0 that works under GNU/Linux amd64 as well as Windows 10 64Bit.
There are two main directories that contain scripts, tools, data and results. These are EMCtools and EMCdata.
Under Windows 10 the default install is C:\EMCtools and D:\EMCdata. GNU/Linux has no drive letters of course.
There is a private config directory C:\EMCtools\pppconfig and the variable SATPY_CONFIG_PATH is set accordingly.
Raw satellite data from EUMETCast may be on the same PC or can be read via network from a special receiver PC.
Each image generation script starts in C:\EMCtools\USRscripts as "python myscript.py timeslot" (or date for LEOs).
The python script then changes directory to D:\EMCdata\tmpdirs\xsat. It copies and maybe decompresses all relevant
data for the timeslot (or a LEO pass) to this scratch dir. Then it globs the needed data segments and stores the
resulting image under directory D:\EMCdata\images\Satellite. The problem is now that private area definitions are
not found anymore. The output below shows that SatPy searches for D:\EMCtools\pppconfig even while the environment
variable SATPY_CONFIG_PATH is correctly pointing to C:\EMCtools\pppconfig. In fact if I make under Windows 10 a
D:\EMCtools\pppconfig and put a copy of my areas.yaml in it, then the script works! Just tested with SatPy v030.
...
raise AreaNotFound('Area "{0}" not found in file "{1}"'.format(area_name, area_file_name))
pyresample.area_config.AreaNotFound: 'Area "isomrss" not found in file "[\'C:\\\\Users\\\\lobsiger\\\\miniconda3\\\\envs\\\\lobsiger\\\\Lib\\\\site-packages\\\\satpy\\\\etc\\\\areas.yaml\', \'D:\\\\EMCtools\\\\pppconfig\\\\areas.yaml\']"'
...
This problem is rather new. It must have started with the change from PPP_CONFIG_DIR to SATPY_CONFIG_PATH.
The environment variable SATPY_CONFIG_PATH that contains 'C:/EMCtools/pppconfig' seems to be converted to
a list ['C','/EMCtools/pppconfig'] and since my scripts do all their work in a scratch directory on drive D:
'/EMCtools/pppconfig' is interpreted as relative path which is then identical to 'D:/EMCtools/pppconfig'.
IN SHORT: The use of the colon ':' as a delimiter in environment variable SATPY_CONFIG_PATH is a problem
for Windows 10 users that have more than one drive. It breaks my EUMETCast PyTROLL/Satpy Starter Kit 3.0.
Best regards,
Ernst
P.S.
Most Windows users of my kit are beginners that will get stuck as soon as they update SatPy from an older
version. They will not find a workaround like using satpy.config.set(config_path=['C:/EMCtools/pppconfig']).