Closed rcraverii closed 2 years ago
GIFTs tagged version 1.3.0 writes to directory in the module installation path which may not be writable by anyone other than the install user.
Steps to reproduce the behavior:
It is expected that the software will complete without error.
Below is example output from our test case. The script 'generate_iwxxm' is our custom command line interface to the GIFTs library.
2021-12-13 19:28:50,837 - gifts.swaDecoder - ERROR - 121 - Unable to load/initialize Skyfield Module. Traceback (most recent call last): File "/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/gifts-1.0.0-py3.8.egg/gifts/swaDecoder.py", line 112, in init load = Loader(os.path.join(os.path.dirname(file), '../data'), verbose=False) File "/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/skyfield-1.40-py3.8.egg/skyfield/iokit.py", line 110, in init os.makedirs(self.directory) File "/opt/python3/pythons/python-3.8.5/lib/python3.8/os.py", line 223, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/gifts-1.0.0-py3.8.egg/gifts/../data' Traceback (most recent call last): File "generate_iwxxm.py", line 75, in service = generate_iwxxm_service() File "generate_iwxxm.py", line 39, in init self.encoders.append((re.compile(r'FN\w\w\d\d\s+[A-Z]{4}\s+\d{6}', re.MULTILINE), gifts.SWA.Encoder())) File "/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/gifts-1.0.0-py3.8.egg/gifts/SWA.py", line 27, in init self.decoder = swaDecoder.Decoder() File "/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/gifts-1.0.0-py3.8.egg/gifts/swaDecoder.py", line 112, in init load = Loader(os.path.join(os.path.dirname(file), '../data'), verbose=False) File "/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/skyfield-1.40-py3.8.egg/skyfield/iokit.py", line 110, in init os.makedirs(self.directory) File "/opt/python3/pythons/python-3.8.5/lib/python3.8/os.py", line 223, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/gifts-1.0.0-py3.8.egg/gifts/../data'
Setting the directory permissions on the directory 'gifts-1.0.0-py3.8.egg' to writable by other users (e.g., 777) allows the application to complete.
Thank you for this report, Rob. Skyfield periodically fetches the latest the JPL ephemeris files to keep them up-to-date. I will look into the destination directory's configuration/properties.
GIFTs tagged version 1.3.0 writes to directory in the module installation path which may not be writable by anyone other than the install user.
Steps to reproduce the behavior:
It is expected that the software will complete without error.
Below is example output from our test case. The script 'generate_iwxxm' is our custom command line interface to the GIFTs library.
2021-12-13 19:28:50,837 - gifts.swaDecoder - ERROR - 121 - Unable to load/initialize Skyfield Module. Traceback (most recent call last): File "/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/gifts-1.0.0-py3.8.egg/gifts/swaDecoder.py", line 112, in init load = Loader(os.path.join(os.path.dirname(file), '../data'), verbose=False) File "/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/skyfield-1.40-py3.8.egg/skyfield/iokit.py", line 110, in init os.makedirs(self.directory) File "/opt/python3/pythons/python-3.8.5/lib/python3.8/os.py", line 223, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/gifts-1.0.0-py3.8.egg/gifts/../data' Traceback (most recent call last): File "generate_iwxxm.py", line 75, in
service = generate_iwxxm_service()
File "generate_iwxxm.py", line 39, in init
self.encoders.append((re.compile(r'FN\w\w\d\d\s+[A-Z]{4}\s+\d{6}', re.MULTILINE), gifts.SWA.Encoder()))
File "/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/gifts-1.0.0-py3.8.egg/gifts/SWA.py", line 27, in init
self.decoder = swaDecoder.Decoder()
File "/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/gifts-1.0.0-py3.8.egg/gifts/swaDecoder.py", line 112, in init
load = Loader(os.path.join(os.path.dirname(file), '../data'), verbose=False)
File "/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/skyfield-1.40-py3.8.egg/skyfield/iokit.py", line 110, in init
os.makedirs(self.directory)
File "/opt/python3/pythons/python-3.8.5/lib/python3.8/os.py", line 223, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/opt/python3/pythons/python-3.8.5/lib/python3.8/site-packages/gifts-1.0.0-py3.8.egg/gifts/../data'
Setting the directory permissions on the directory 'gifts-1.0.0-py3.8.egg' to writable by other users (e.g., 777) allows the application to complete.