Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit69cc3c3

Browse files
Add URLdecode of param_label in /attribute handler
1 parent89e4743 commit69cc3c3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎R/live.R‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ run_server <- function(arena, port = 8181, host = "127.0.0.1",
3030
if (is.null(arena)||!is(arena,"arena_live")) {
3131
stop("Invalid arena argument")
3232
}
33-
pr<-plumber::plumber$new()
33+
pr<-plumber::Plumber$new()
3434
json_structure<- get_json_structure(arena)
3535

3636
# helper function to find explainer for given name
@@ -202,11 +202,14 @@ run_server <- function(arena, port = 8181, host = "127.0.0.1",
202202
pr$handle("GET","/attribute/<param_type>/<param_label>",
203203
function(req,res,param_type="",param_label="") {
204204
if (!arena$params$enable_attributes)return(res$status<-404)
205+
# replace %20 with space etc.
206+
param_label<- URLdecode(param_label)
205207
if (param_type=="model") {
206208
explainer<- get_explainer(param_label)
207209
if (is.null(explainer))return(res$status<-404)
208210
get_model_attributes(arena,explainer)
209211
}elseif (param_type=="observation") {
212+
print(param_label)
210213
observation<- get_observation(param_label)
211214
if (is.null(observation))return(res$status<-404)
212215
get_observation_attributes(arena,observation)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp