Hi,
read_fwf on an empty file throws this (Windows-specific I think) error message:
Error: Cannot read file xxx: The volume for a file has been externally altered so that the opened file is no longer valid.
Note that this is a new behaviour: before I installed the latest readr version, the error was simply Cannot read file xxx.
I have the latest readr from github (re-installed minutes ago) and I work with R version 3.2.3 on Windows 7.
To reproduce:
library("readr")
# create an empty file in working dir
write_csv(data.frame(), "emptyFile")
# this line fails
read_fwf("emptyFile", col_positions=fwf_widths(1))
This is similar to this issue, which has been solved by returning empty structures when the file was empty. I suggest to extend the fix to read_fwf.
Hi,
read_fwf on an empty file throws this (Windows-specific I think) error message:
Error: Cannot read file xxx: The volume for a file has been externally altered so that the opened file is no longer valid.Note that this is a new behaviour: before I installed the latest
readrversion, the error was simplyCannot read file xxx.I have the latest
readrfrom github (re-installed minutes ago) and I work with R version 3.2.3 on Windows 7.To reproduce:
This is similar to this issue, which has been solved by returning empty structures when the file was empty. I suggest to extend the fix to
read_fwf.