You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described in the documentation (http://rhodesmill.org/skyfield/files.html) and API (http://rhodesmill.org/skyfield/api-iokit.html), a customer Loader using a data directory, e.g., Loader(cache) should keep data files in that directory. The open() method, also called by tle(), does not honor the custom Loader directory. Related to discussion in closed issue #89.
My intended use case is to be able to make use of multiple (already local) TLE files from past times for point-in-time retrospectives. One path of exploration would use multiple Loader() objects.
Workaround is to prepend the data directory manually prior to open() or tle() calls. Easy enough in the short term.
With d5b70da open() was updated to permit specifying local filenames (yay!). Prior to the commit, using a relative path (e.g., './tle.txt') within the custom Loader() sufficed as a kludge.
$ python poc.py
Loaded 2 object identifiers
-----
Traceback (most recent call last):
File "poc.py", line 12, in <module>
earth_satellites = load.tle('./3le.txt')
File "~/.local/virtualenvs/DPXkZ7s8/lib/python3.7/site-packages/skyfield/iokit.py", line 213, in tle
with self.open(url, reload=reload, filename=filename) as f:
File "~/.local/virtualenvs/DPXkZ7s8/lib/python3.7/site-packages/skyfield/iokit.py", line 240, in open
return open(url, mode)
FileNotFoundError: [Errno 2] No such file or directory: './3le.txt'
File structure:
$ ls poc.py cache
poc.py
cache:
3le.txt
My sample 3le.txt only has two entries, and existed prior to invocation.
The text was updated successfully, but these errors were encountered:
As described in the documentation (http://rhodesmill.org/skyfield/files.html) and API (http://rhodesmill.org/skyfield/api-iokit.html), a customer Loader using a data directory, e.g., Loader(cache) should keep data files in that directory. The open() method, also called by tle(), does not honor the custom Loader directory. Related to discussion in closed issue #89.
My intended use case is to be able to make use of multiple (already local) TLE files from past times for point-in-time retrospectives. One path of exploration would use multiple Loader() objects.
Workaround is to prepend the data directory manually prior to open() or tle() calls. Easy enough in the short term.
With d5b70da open() was updated to permit specifying local filenames (yay!). Prior to the commit, using a relative path (e.g., './tle.txt') within the custom Loader() sufficed as a kludge.
Sample poc.py:
Traceback:
File structure:
My sample 3le.txt only has two entries, and existed prior to invocation.
The text was updated successfully, but these errors were encountered: