Closed jkrage closed 6 years ago
I forgot to point out this is a similar issue as initially reported in #174, though the discussion on that has moved into a different direction.
Thanks for pointing out that problem! I have added tests, so hopefully this won't break from now on.
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 d5b70dab6018edd4027b44c4dd7ce4ef1592a101 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.