Closed lzhao33573796 closed 1 year ago
This is the error message you get if you try to open a file that does not exist or you do not have the permissions to read.
This is the error message you get if you try to open a file that does not exist or you do not have the permissions to read.
Is there any way to solve this? Because for the same file, .txt works but .lp does not. The same file should have the same permission I assume?
Can you explain what you mean by "for the same file"? Because "/Users/lxz/Documents/queens.lp" and "/Users/lxz/Documents/queens.txt" are paths to different files, unless both paths exist and one is a hard or symbolic link to the other.
Note, it is very unlikely that this is a bug either in Clingo or in the MacOS M2 standard library.
More likely is that you have a file named "/Users/lxz/Documents/queens.txt" but not one named "/Users/lxz/Documents/queens.lp". Or the file named "/Users/lxz/Documents/queens.lp" isn't readable as your login (for example, it was copy/created as the root user).
From a command prompt can you run "ls -al /Users/lxz/Documents/queens.*" to check?
On 1/3/23 14:23, lzhao33573796 wrote:
This is the error message you get if you try to open a file that does not exist or you do not have the permissions to read.
Is there any way to solve this? Because for the same file, .txt works but .lp does not. The same file should have the same permission I assume?
— Reply to this email directly, view it on GitHub https://github.com/potassco/clingo/issues/410#issuecomment-1449276043, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHCLVTSFQDUAI6BHHQFMWDWZ26K5ANCNFSM6AAAAAAVLG6J3I. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Can you explain what you mean by "for the same file"? Because "/Users/lxz/Documents/queens.lp" and "/Users/lxz/Documents/queens.txt" are paths to different files, unless both paths exist and one is a hard or symbolic link to the other. Note, it is very unlikely that this is a bug either in Clingo or in the MacOS M2 standard library. More likely is that you have a file named "/Users/lxz/Documents/queens.txt" but not one named "/Users/lxz/Documents/queens.lp". Or the file named "/Users/lxz/Documents/queens.lp" isn't readable as your login (for example, it was copy/created as the root user). From a command prompt can you run "ls -al /Users/lxz/Documents/queens.*" to check? …
So for the same file, I mean if I start with an empty text file, after writing the rules, I can make this file have either an extension of .txt, or an extension of .pl. When I set the extension of this file to .txt, clingo runs it perfectly fine. However, if I set the extension of this file to .pl, clingo will throw the error message. I am guessing that somehow the .pl file may have a different permission. I will try again tomorrow when I have access to the same laptop.
Maybe the OS is hiding the extension? Like Windows does by default? Have you checked the output of the commands:
cd /Users/lxz/Documents
ls -l
cat queens.lp
Just got it solved. The OS named it queen.lp.txt and hide the .txt. I think that is all for my question.
Thank you for your help!
On Wed, Mar 1, 2023 at 00:22 Roland Kaminski @.***> wrote:
Maybe the OS is hiding the extension? Like Windows does by default? Have you checked the output of the commands:
cd /Users/lxz/Documents ls -l cat queens.lp
— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/potassco/clingo/issues/410*issuecomment-1449475045__;Iw!!IKRxdwAv5BmarQ!Y5P_0_poX_VCmGNOZjAl2hknBee_wQ1eisLCdY04tH1-ywyUrgVEhHaLeXC_PCcTvl_laCtWGg7bakjnzupe9vtsDg$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ANOAFFJCZQNEZBYCOEHD2RDWZ32JLANCNFSM6AAAAAAVLG6J3I__;!!IKRxdwAv5BmarQ!Y5P_0_poX_VCmGNOZjAl2hknBee_wQ1eisLCdY04tH1-ywyUrgVEhHaLeXC_PCcTvl_laCtWGg7bakjnzuqp56vtBw$ . You are receiving this because you authored the thread.Message ID: @.***>
This is the detail for the problem: (py3.6) lxz@lxs-mbp ~ % clingo /Users/lxz/Documents/queens.lp -c n=12 0 clingo version 5.6.2 Reading from ...lxz/Documents/queens.lp