错误:source_sink`'/ Users ...''不存在(无法编译prolog文件)

时间:2017-02-02 10:44:39

标签: prolog swi-prolog

我在swi中输入了? - ['/ Users / Alexis / Desktop / A10.pl'],出现了以下错误:

    ERROR: source_sink `' /Users/Alexis/Desktop/A10.pl '' does not exist
    ERROR: In:
    ERROR:   [20] throw(error(existence_error(source_sink,' /Users/Alex/Desktop/A10.pl '),_4920))
    ERROR:   [15] '$load_file'(' /Users/Alexis/Desktop/A10.pl ',user,[expand(false),...]) at /Applications/SWI-Prolog.app/Contents/swipl/boot/init.pl:1951
    ERROR:    [7] <user>
    ERROR: 
    ERROR: Note: some frames are missing due to last-call optimization.
    ERROR: Re-run your program in debug mode (:- debug.) to get more detail. 

更重要的是,无论我输入什么.pl文件,都会出现上述相同的错误。 .pl文件的目录是正确的,但它无法编译。我该如何解决这个问题呢?

1 个答案:

答案 0 :(得分:2)

您的问题是路径周围的空间。

?- [' /Users/Alexis/Desktop/A10.pl ']将因该错误而失败。

?- ['/Users/Alexis/Desktop/A10.pl']不应该。