Fix metrics dashboard
Closed, ResolvedPublic2 Story Points


Currently seeing the following error:

Warning in readLines(file, warn = FALSE) :
  invalid input found on input connection '/vagrant/shiny-server/metrics/server.R'
Error in source(file, ..., keep.source = TRUE, encoding = checkEncoding(file)) : 
  /vagrant/shiny-server/metrics/server.R:277:43: unexpected INCOMPLETE_STRING
276:              } %>% {
277:                c(paste(.[1:2], collapse = "

This doesn't happen when I run the dash locally. Nor does it happen to @Ironholds. I suspect something funky is going on the vagrant side.

@Deskana, @EBernhardson and I (but mostly Erik who knows infinitely more about the inner workings of the new vagrant-based system) are looking into it.

mpopov created this task.Sep 8 2015, 11:56 PM
mpopov updated the task description. (Show Details)
mpopov raised the priority of this task from to Unbreak Now!.
mpopov assigned this task to EBernhardson.
mpopov added subscribers: mpopov, Ironholds, Deskana, EBernhardson.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 8 2015, 11:56 PM

I looked at the source file and it became almost immediatly obvious, the string it is complaining about contains non-ascii characters. So i did a quick check to see if R source files are UTF-8 encoded. This lead me to stackoverflow[1]. The summary seems to be that locale's need to be defined somewhere. I havn't had a chance yet to look into it further.


Oh gods THAT old problem. If you load up an R instance on the machine you'll see the locale simply isn't being set - I think it's a C- or perl-side thing. Bah.

Ironholds set Security to None.Sep 9 2015, 2:33 PM
Ironholds edited a custom field.
mpopov added a comment.Sep 9 2015, 3:34 PM

Good job figuring it out, Erik. Okay, going to push a patch to remove the non-ascii chars.

Sorry I broke the dashboard with my typographic flair, y'all.

Change 237115 had a related patch set uploaded (by Bearloga):
Updated dashes hashes.

Change 237115 merged by OliverKeyes:
Updated dashes hashes.

Change 237144 had a related patch set uploaded (by EBernhardson):
Force language settings for shiny-server daemon

Change 237144 merged by OliverKeyes:
Force language settings for shiny-server daemon

Deskana closed this task as Resolved.Sep 23 2015, 5:03 AM
Deskana moved this task from Done to Resolved on the Discovery-Analysis (Current work) board.