0

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*/).
Thanos Tintinidis
  • 5,828
  • 1
  • 20
  • 31
Yasmin
  • 931
  • 3
  • 14
  • 35
  • It isn't a normal error, I am using ! where there is a menu : `code` action(1):-!,make some processing,fail. action(2):-!,make some processing,fail. ..... `code` once the user selects action(1), while backtracking it backs and fail so it isn't a normal error while reading the file. – Yasmin Jan 04 '13 at 16:35

1 Answers1

2

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

Anniepoo
  • 2,152
  • 17
  • 17