Skip to content

fread does not stop when input is unsupported (e.g. binary file) #2834

@qgeissmann

Description

@qgeissmann

For instance, if user put a random png file as input, no error is raised:

dt <- fread("https://raw.githubusercontent.com/wiki/Rdatatable/data.table/icons/sticker.png")

We get:

Warning message:
In fread("https://raw.githubusercontent.com/wiki/Rdatatable/data.table/icons/sticker.png") :
  Stopped early on line 3. Expected 1 fields but found 1. Consider fill=TRUE and comment.char=. First discarded non-empty line: <<>>

We even get a data table:

> dt
   \x89PNG
1:    \032

Note sure I should, but I would expect failure instead.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions