2017-05-25 143 views
1

剛剛從GitHub中提取了一個存儲庫並保存在「下載」下。嘗試運行的程序,並不斷收到這些錯誤:無法在Julia中打開文件

julia> using FITSIO 

    julia> include("readoifits.jl") 
    ERROR: could not open file /home/ellie/Downloads/readoifits.jl 
    in include_from_node1(::String) at ./loading.jl:488 

    julia> include("setupft.jl") 
    ERROR: could not open file /home/ellie/Downloads/setupft.jl 
    in include_from_node1(::String) at ./loading.jl:488 

    julia> include("oichi2.jl") 
    ERROR: could not open file /home/ellie/Downloads/oichi2.jl 
    in include_from_node1(::String) at ./loading.jl:488 

    julia> include("oiplot.jl") 
    ERROR: could not open file /home/ellie/Downloads/oiplot.jl 
    in include_from_node1(::String) at ./loading.jl:488 

所以它知道文件存在,並且它位於哪裏,但不能打開它們。有人可以解釋一下node1和String位的含義以及如何打開這些文件嗎?謝謝。

回答

2

你目前的目錄是什麼?您似乎正在運行下載目錄中的REPL - 可能包含您的數據但不包含您的代碼?您可以使用pwd()函數找出當前目錄。 REPL中的include函數打開相對於當前工作目錄的文件,該目錄是啓動Julia進程時所處的目錄。 (當從另一個源文件調用時,include將查找與該源文件目錄相關的文件。)

+2

託管在足夠長的時間轉着圈跑來實現這個確切的事情。總新手。感謝您的迴應! – ellielinc

1

已解決問題。

需要深入到路徑中。 在開啓朱莉婭,我改變了目錄

cd /home/ellie/Downloads 

應該去一個更深入到它

cd/home/ellie/Downloads/OITOOLS.jl 

下的文件初學者的錯誤:)