Thanks for your perseverance with this issue. It is definitely a strange one!
First, how did you look at your PATH variable? When viewing the PATH variable from the Windows Control Panel or printing out the results of running “path” in the command prompt, the “.” (dots) are not visible. They are only visible when calling os.environ[“PATH”] from a Python interpreter.
Second, you were able to import rasterio and pysyncrosim no problem from the Python interpreter because the issue only arises when running omniscape from the SyncroSim User Interface. This is because rasterio is looking for a GDAL DLL in all paths specified from running os.environ[“PATH”] in Python, and when running from the SyncroSim UI, the current directory (i.e., “.”) also contains a GDAL DLL. On import, rasterio enters all paths that contain a GDAL DLL into the os.add_dll_directory() function, including the “.”, which is invalid and results in the error you see here. When running from the Python interpreter, the current directory (i.e., “.”) does not contain a GDAL DLL, so all works as expected.