none
cannot use the JPEG() function RRS feed

  • Question

  • Hi All:

    I am trying to open the use the jpeg() function in sql server r service, and then it returns this to me this error message:

    Msg 39004, Level 16, State 20, Line 239
    A 'R' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004.
    Msg 39019, Level 16, State 1, Line 239
    An external script error occurred:
    Error in jpeg(filename = image_filename, width = 600, height = 800) :
      unable to start jpeg() device
    Calls: source -> withVisible -> eval -> eval -> jpeg
    In addition: Warning messages:
    1: In jpeg(filename = image_filename, width = 600, height = 800) :
      unable to open file 'C:\temp\plots\plot_2eac2772d39.jpg' for writing
    2: In jpeg(filename = image_filename, width = 600, height = 800) :
      opening device failed
    Error in ScaleR.  Check the output for more information.
    Error in eval(expr, envir, enclos) :
      Error in ScaleR.  Check the output for more information.
    Calls: source -> withVisible -> eval -> eval -> .Call
    Execution halted
    Msg 11536, Level 16, State 1, Line 239
    EXECUTE statement failed because its WITH RESULT SETS clause specified 1 result set(s), but the statement only sent 0 result set(s) at run time.
    STDOUT message(s) from external script:
    [1] "C:\\temp\\plots\\plot_2eac2772d39.jpg"

    Also, I tried to use this function in the visual studio R interactive, it just shuts down my visual studio application, anyone knows a solution will be really appreciated.

    Cheers

    Johnny

    Saturday, April 22, 2017 3:20 AM

All replies

  • HI JohnnyKahWang,

    Have you tried run jpeg function with your data in RClient or RStudio? That will help to eliminate if this is a package issue or client tool issue.

    Thanks,
    Shau Phang
    Microsoft R Server Engineering

    Thursday, June 1, 2017 1:27 AM