Yasmin
Yasmin

Reputation: 951

ERROR: read_util:read_line_to_codes/2: <stream> does not exist

While I am trying to read file and make some processing on the input and write them in another file, I met this error,

ERROR: read_util:read_line_to_codes/2: <stream> Number does not exist

Where Number is number of stream (ex: 04068B20)) and it's changed each time .

read_File(Stream,[H|T],LineNumber):-
    read_line_to_codes(Stream, H),      
    (H \= end_of_file -> /*open other file and write in it*/).

Upvotes: 0

Views: 634

Answers (1)

Anniepoo
Anniepoo

Reputation: 2162

Your stream doesn't exist. Could you somehow be closing the stream and/or moving/deleting the file?

Upvotes: 2

Related Questions