3

I'm trying to upload images from a R Markdown knitr document in RStudio 0.96. I've tried running the following code that is meant to be a minimal example. However, I get the following error message:

List of 1
 $ message: logi FALSE

label: md-cars (with options) 
List of 1
 $ message: logi FALSE

Error in process_file(text) : 
  Quitting from lines 31-34: Error in function (type, msg, asError = TRUE)  : Empty reply from server
Calls: knit -> process_file

Execution halted

knitr terminated with status 1
  • What might cause this error message?
  • How can I upload images to Imgur using knitr and avoid this error message?
Jeromy Anglim
  • 33,939
  • 30
  • 115
  • 173

2 Answers2

2

This answer suggested that the error may be related to firewalls and proxy servers. When I tested the above code I was at work at a university, where there are such things. When I tried it at home over a different network, the code worked.

Community
  • 1
  • 1
Jeromy Anglim
  • 33,939
  • 30
  • 115
  • 173
1

Make sure you include this line in your code:

opts_knit$set(upload.fun = imgur_upload)

n.e.w
  • 1,128
  • 10
  • 23
  • Thanks. I agree that is required. and it's a good point to make. My specific error only results when this setting is already activated. – Jeromy Anglim May 21 '12 at 07:33