Trouble Furnishing Files
Closed this issue · 2 comments
Hello, sorry if this question has an obvious answer, but I am still at a beginner-intermediate programming level. I am trying to load in a few spice files directly with the line
spice.furnsh(open("/Users/xander/Downloads/file.bsp", "r"))
where file is just a stand-in name for the file I have downloaded, and the bsp could be any extension. I am getting the error message
SPICE(NOSUCHFILE) --
The attempt to load "KPL/LSK
" by the routine FURNSH failed. It could not be located.
furnsh_c --> FURNSH --> ZZLDKER"
and I am not sure why. I have tested accessing the files with some read functions to make sure that the file path is correct, so I am unsure as to why it is saying this file cannot be located. Is there some other way to access this file that I am not aware of? Or does furnsh not like that I am using the "open" function or "r"? I tried to look up some examples online, but was not able to determine what it is I was doing wrong. Thank you!
you don't need the open()
around the file path. furnsh
expects strings (so just spice.furnsh('/Users/xander/Downloads/file.bsp')
). If you haven't found them yet there are tutorials and other documentation demonstrating usage at https://spiceypy.readthedocs.io/en/stable/
Thank you very much! That fixed it