Last updated on 2024-12-04 22:50:40 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 1.0.4 | 6.32 | 49.39 | 55.71 | ERROR | |
r-devel-linux-x86_64-debian-gcc | 1.0.4 | 3.91 | 36.45 | 40.36 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 1.0.4 | 98.60 | ERROR | |||
r-devel-linux-x86_64-fedora-gcc | 1.0.4 | 84.30 | ERROR | |||
r-devel-windows-x86_64 | 1.0.4 | 8.00 | 160.00 | 168.00 | ERROR | |
r-patched-linux-x86_64 | 1.0.4 | 6.47 | 46.77 | 53.24 | ERROR | |
r-release-linux-x86_64 | 1.0.4 | 5.33 | 72.15 | 77.48 | OK | |
r-release-macos-arm64 | 1.0.4 | 133.00 | OK | |||
r-release-macos-x86_64 | 1.0.4 | 156.00 | OK | |||
r-release-windows-x86_64 | 1.0.4 | 9.00 | 418.00 | 427.00 | ERROR | |
r-oldrel-macos-arm64 | 1.0.4 | 126.00 | OK | |||
r-oldrel-macos-x86_64 | 1.0.4 | 151.00 | OK | |||
r-oldrel-windows-x86_64 | 1.0.4 | 10.00 | 427.00 | 437.00 | ERROR |
Version: 1.0.4
Check: examples
Result: ERROR
Running examples in ‘rdracor-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: dracor_api
> ### Title: Send a GET request to DraCor API and parse the results
> ### Aliases: dracor_api
>
> ### ** Examples
>
> dracor_api("https://dracor.org/api/v1/info", expected_type = "application/json")
Problem with server occured:
improper data returned:
Error in curl::curl_fetch_memory(url, handle = handle): Could not resolve hostname [dracor.org]: Could not resolve host: dracor.org
Error in if (resp$status_code == 404) { : argument is of length zero
Calls: dracor_api -> dracor_error
Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64
Version: 1.0.4
Check: tests
Result: ERROR
Running ‘testthat.R’ [4s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(rdracor)
>
> test_check("rdracor")
DraCor API was not found:
[ FAIL 34 | WARN 0 | SKIP 0 | PASS 8 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-core.R:21:3'): dracor_sparql() returns xml_document by default ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-core.R:21:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql("SELECT * WHERE {?s ?p ?o} LIMIT 10")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:28:3'): dracor_sparql() returns character with parse = FALSE ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-core.R:28:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:37:3'): dracor_sparql() returns xml_document ────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-core.R:37:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql("SELECT * WHERE {?s ?p ?o} LIMIT 10")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:44:3'): dracor_sparql() with parse = FALSE returns character ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-core.R:44:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:53:3'): dracor_api_info returns NULL ────────────────────
Error in `cat("DraCor API was not found:\n", e)`: argument 2 (type 'list') cannot be handled by 'cat'
Backtrace:
▆
1. ├─testthat::expect_invisible(dracor_api_info()) at test-core.R:53:3
2. │ └─base::withVisible(call)
3. └─rdracor::dracor_api_info()
4. └─base::tryCatch(...)
5. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
6. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
7. └─value[[3L]](cond)
8. └─base::cat("DraCor API was not found:\n", e)
── Error ('test-core.R:53:3'): dracor_api_info returns NULL ────────────────────
Error in `dracor_api_info()`: object 'api_info_list' not found
Backtrace:
▆
1. ├─testthat::expect_invisible(dracor_api_info()) at test-core.R:53:3
2. │ └─base::withVisible(call)
3. └─rdracor::dracor_api_info()
4. ├─base::tryCatch(...)
5. ├─base::cat(...)
6. └─base::paste(...)
── Error ('test-dracor.R:2:3'): Cal corpus is S3 class 'dracor' ────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor("cal"), "dracor") at test-dracor.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor("cal")
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:11:3'): several corpora are downloaded via get_dracor() if character vector
is provided ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor(c("tat", "span")), "tbl_df") at test-dracor.R:11:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor(c("tat", "span"))
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:15:3'): is.dracor() works for 'dracor' object ─────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(is.dracor(get_dracor("cal"))) at test-dracor.R:15:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor:::is.dracor(get_dracor("cal"))
5. └─rdracor::get_dracor("cal")
6. └─rdracor:::get_available_corpus_names()
7. └─rdracor::get_dracor_meta()
8. ├─rdracor:::dracor_meta(...)
9. │ └─utils::type.convert(...)
10. └─rdracor::dracor_api(...)
11. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:25:5'): summary() work for 'dracor' object if there is no info on some years ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(...) at test-dracor.R:25:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nchar(capture.output(summary(get_dracor("tat"))))
5. ├─utils::capture.output(summary(get_dracor("tat")))
6. │ └─base::withVisible(...elt(i))
7. ├─base::summary(get_dracor("tat"))
8. └─rdracor::get_dracor("tat")
9. └─rdracor:::get_available_corpus_names()
10. └─rdracor::get_dracor_meta()
11. ├─rdracor:::dracor_meta(...)
12. │ └─utils::type.convert(...)
13. └─rdracor::dracor_api(...)
14. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:35:5'): Written year with format 'YYYY/YYYY' is processed as integer in column
yearWrittenFinish ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_is(get_dracor("rus")$yearWrittenFinish, "integer") at test-dracor.R:35:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor("rus")
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:40:3'): get_character_plays() for Maria Stuart returns at least 2 plays ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_gte(...) at test-dracor.R:40:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nrow(get_character_plays(char_wiki_id = "Q131412"))
5. └─rdracor::get_character_plays(char_wiki_id = "Q131412")
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:2:3'): get_dracor_meta() returns dracor_meta object ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor_meta(), "dracor_meta") at test-dracor_meta.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor_meta()
5. ├─rdracor:::dracor_meta(...)
6. │ └─utils::type.convert(...)
7. └─rdracor::dracor_api(...)
8. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:6:3'): is.dracor_meta() works for 'dracor_meta' object ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(is.dracor_meta(get_dracor_meta())) at test-dracor_meta.R:6:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor:::is.dracor_meta(get_dracor_meta())
5. └─rdracor::get_dracor_meta()
6. ├─rdracor:::dracor_meta(...)
7. │ └─utils::type.convert(...)
8. └─rdracor::dracor_api(...)
9. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:14:3'): summary for dracor_meta object is visible ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_dracor_meta() at test-dracor_meta.R:14:3
2. ├─rdracor:::dracor_meta(...)
3. │ └─utils::type.convert(...)
4. └─rdracor::dracor_api(...)
5. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:2:3'): get_net_cooccur_metrics returns list ──────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-net.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_metrics("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:6:3'): column names for get_net_cooccur_edges() are valid ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-net.R:6:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_edges("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:13:3'): get_net_cooccur_gexf() returns valid object ──────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_gexf("pushkin-boris-godunov", "rus") at test-net.R:13:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:23:3'): cooccur_igraph is returned by get_net_cooccur_igraph() ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-net.R:23:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_igraph("gogol-zhenitba", "rus")
5. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:30:3'): label_cooccur_igraph() return come NA for big network ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:30:3
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:37:5'): label_cooccur_igraph() do not return NA after max_graph_size adjustment ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:37:5
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:43:3'): summary.cooccur_igraph() prints appropriate number of rows ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:43:3
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:48:3'): relations_igraph is returned by get_net_relations_igraph() ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-net.R:48:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_relations_igraph("gogol-zhenitba", "rus")
5. └─rdracor::get_net_relations_edges(...)
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:2:3'): get_play_metadata returns list ───────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-play.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_play_metadata("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:6:3'): rdf is not empty ─────────────────────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_play_rdf("pushkin-boris-godunov", "rus") at test-play.R:6:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:12:3'): boris godunov has 79 characters ─────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-play.R:12:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nrow(get_play_characters("pushkin-boris-godunov", "rus"))
5. └─rdracor::get_play_characters("pushkin-boris-godunov", "rus")
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-tei_to_df.R:2:3'): tei_to_df converts tei object to tibble ─────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-tei_to_df.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor::tei_to_df(get_text_tei(corpus = "rus", play = "gogol-zhenitba"))
5. │ └─tei %>% xml2::xml_ns_strip()
6. ├─xml2::xml_ns_strip(.)
7. │ └─xml2::xml_find_all(x, "//namespace::*[name()='']/parent::*")
8. └─rdracor::get_text_tei(corpus = "rus", play = "gogol-zhenitba")
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-tei_to_df.R:9:3'): get_text_df returns tibble ──────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-tei_to_df.R:9:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor::get_text_df(corpus = "rus", play = "gogol-zhenitba")
5. │ ├─get_text_tei(play = play, corpus = corpus) %>% tei_to_df()
6. │ └─rdracor::get_text_tei(play = play, corpus = corpus)
7. │ └─rdracor::dracor_api(...)
8. │ └─rdracor:::dracor_error(resp)
9. ├─rdracor::tei_to_df(.)
10. │ └─tei %>% xml2::xml_ns_strip()
11. └─xml2::xml_ns_strip(.)
12. └─xml2::xml_find_all(x, "//namespace::*[name()='']/parent::*")
── Error ('test-text.R:2:3'): tei text is not empty ────────────────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_text_tei("pushkin-boris-godunov", "rus") at test-text.R:2:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:8:3'): get_text_chr_spoken() returns text ───────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:8:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:17:5'): get_text_chr_spoken() for Boris Godunov, UNKNOWN gender returns more than one value ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_gt(...) at test-text.R:17:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:27:3'): get_text_chr_spoken_bych() returns data.frame ───
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:27:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken_bych("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:34:3'): get_text_chr_stage() returns text ───────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:34:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_stage("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:41:3'): get_text_chr_stage_with_sp() returns text ───────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:41:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_stage_with_sp(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
[ FAIL 34 | WARN 0 | SKIP 0 | PASS 8 ]
Error: Test failures
Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-patched-linux-x86_64
Version: 1.0.4
Check: tests
Result: ERROR
Running ‘testthat.R’ [3s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(rdracor)
>
> test_check("rdracor")
DraCor API was not found:
[ FAIL 34 | WARN 0 | SKIP 0 | PASS 8 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-core.R:21:3'): dracor_sparql() returns xml_document by default ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-core.R:21:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql("SELECT * WHERE {?s ?p ?o} LIMIT 10")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:28:3'): dracor_sparql() returns character with parse = FALSE ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-core.R:28:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:37:3'): dracor_sparql() returns xml_document ────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-core.R:37:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql("SELECT * WHERE {?s ?p ?o} LIMIT 10")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:44:3'): dracor_sparql() with parse = FALSE returns character ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-core.R:44:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:53:3'): dracor_api_info returns NULL ────────────────────
Error in `cat("DraCor API was not found:\n", e)`: argument 2 (type 'list') cannot be handled by 'cat'
Backtrace:
▆
1. ├─testthat::expect_invisible(dracor_api_info()) at test-core.R:53:3
2. │ └─base::withVisible(call)
3. └─rdracor::dracor_api_info()
4. └─base::tryCatch(...)
5. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
6. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
7. └─value[[3L]](cond)
8. └─base::cat("DraCor API was not found:\n", e)
── Error ('test-core.R:53:3'): dracor_api_info returns NULL ────────────────────
Error in `dracor_api_info()`: object 'api_info_list' not found
Backtrace:
▆
1. ├─testthat::expect_invisible(dracor_api_info()) at test-core.R:53:3
2. │ └─base::withVisible(call)
3. └─rdracor::dracor_api_info()
4. ├─base::tryCatch(...)
5. ├─base::cat(...)
6. └─base::paste(...)
── Error ('test-dracor.R:2:3'): Cal corpus is S3 class 'dracor' ────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor("cal"), "dracor") at test-dracor.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor("cal")
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:11:3'): several corpora are downloaded via get_dracor() if character vector
is provided ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor(c("tat", "span")), "tbl_df") at test-dracor.R:11:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor(c("tat", "span"))
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:15:3'): is.dracor() works for 'dracor' object ─────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(is.dracor(get_dracor("cal"))) at test-dracor.R:15:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor:::is.dracor(get_dracor("cal"))
5. └─rdracor::get_dracor("cal")
6. └─rdracor:::get_available_corpus_names()
7. └─rdracor::get_dracor_meta()
8. ├─rdracor:::dracor_meta(...)
9. │ └─utils::type.convert(...)
10. └─rdracor::dracor_api(...)
11. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:25:5'): summary() work for 'dracor' object if there is no info on some years ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(...) at test-dracor.R:25:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nchar(capture.output(summary(get_dracor("tat"))))
5. ├─utils::capture.output(summary(get_dracor("tat")))
6. │ └─base::withVisible(...elt(i))
7. ├─base::summary(get_dracor("tat"))
8. └─rdracor::get_dracor("tat")
9. └─rdracor:::get_available_corpus_names()
10. └─rdracor::get_dracor_meta()
11. ├─rdracor:::dracor_meta(...)
12. │ └─utils::type.convert(...)
13. └─rdracor::dracor_api(...)
14. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:35:5'): Written year with format 'YYYY/YYYY' is processed as integer in column
yearWrittenFinish ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_is(get_dracor("rus")$yearWrittenFinish, "integer") at test-dracor.R:35:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor("rus")
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:40:3'): get_character_plays() for Maria Stuart returns at least 2 plays ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_gte(...) at test-dracor.R:40:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nrow(get_character_plays(char_wiki_id = "Q131412"))
5. └─rdracor::get_character_plays(char_wiki_id = "Q131412")
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:2:3'): get_dracor_meta() returns dracor_meta object ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor_meta(), "dracor_meta") at test-dracor_meta.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor_meta()
5. ├─rdracor:::dracor_meta(...)
6. │ └─utils::type.convert(...)
7. └─rdracor::dracor_api(...)
8. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:6:3'): is.dracor_meta() works for 'dracor_meta' object ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(is.dracor_meta(get_dracor_meta())) at test-dracor_meta.R:6:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor:::is.dracor_meta(get_dracor_meta())
5. └─rdracor::get_dracor_meta()
6. ├─rdracor:::dracor_meta(...)
7. │ └─utils::type.convert(...)
8. └─rdracor::dracor_api(...)
9. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:14:3'): summary for dracor_meta object is visible ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_dracor_meta() at test-dracor_meta.R:14:3
2. ├─rdracor:::dracor_meta(...)
3. │ └─utils::type.convert(...)
4. └─rdracor::dracor_api(...)
5. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:2:3'): get_net_cooccur_metrics returns list ──────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-net.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_metrics("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:6:3'): column names for get_net_cooccur_edges() are valid ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-net.R:6:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_edges("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:13:3'): get_net_cooccur_gexf() returns valid object ──────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_gexf("pushkin-boris-godunov", "rus") at test-net.R:13:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:23:3'): cooccur_igraph is returned by get_net_cooccur_igraph() ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-net.R:23:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_igraph("gogol-zhenitba", "rus")
5. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:30:3'): label_cooccur_igraph() return come NA for big network ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:30:3
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:37:5'): label_cooccur_igraph() do not return NA after max_graph_size adjustment ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:37:5
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:43:3'): summary.cooccur_igraph() prints appropriate number of rows ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:43:3
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:48:3'): relations_igraph is returned by get_net_relations_igraph() ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-net.R:48:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_relations_igraph("gogol-zhenitba", "rus")
5. └─rdracor::get_net_relations_edges(...)
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:2:3'): get_play_metadata returns list ───────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-play.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_play_metadata("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:6:3'): rdf is not empty ─────────────────────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_play_rdf("pushkin-boris-godunov", "rus") at test-play.R:6:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:12:3'): boris godunov has 79 characters ─────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-play.R:12:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nrow(get_play_characters("pushkin-boris-godunov", "rus"))
5. └─rdracor::get_play_characters("pushkin-boris-godunov", "rus")
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-tei_to_df.R:2:3'): tei_to_df converts tei object to tibble ─────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-tei_to_df.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor::tei_to_df(get_text_tei(corpus = "rus", play = "gogol-zhenitba"))
5. │ └─tei %>% xml2::xml_ns_strip()
6. ├─xml2::xml_ns_strip(.)
7. │ └─xml2::xml_find_all(x, "//namespace::*[name()='']/parent::*")
8. └─rdracor::get_text_tei(corpus = "rus", play = "gogol-zhenitba")
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-tei_to_df.R:9:3'): get_text_df returns tibble ──────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-tei_to_df.R:9:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor::get_text_df(corpus = "rus", play = "gogol-zhenitba")
5. │ ├─get_text_tei(play = play, corpus = corpus) %>% tei_to_df()
6. │ └─rdracor::get_text_tei(play = play, corpus = corpus)
7. │ └─rdracor::dracor_api(...)
8. │ └─rdracor:::dracor_error(resp)
9. ├─rdracor::tei_to_df(.)
10. │ └─tei %>% xml2::xml_ns_strip()
11. └─xml2::xml_ns_strip(.)
12. └─xml2::xml_find_all(x, "//namespace::*[name()='']/parent::*")
── Error ('test-text.R:2:3'): tei text is not empty ────────────────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_text_tei("pushkin-boris-godunov", "rus") at test-text.R:2:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:8:3'): get_text_chr_spoken() returns text ───────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:8:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:17:5'): get_text_chr_spoken() for Boris Godunov, UNKNOWN gender returns more than one value ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_gt(...) at test-text.R:17:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:27:3'): get_text_chr_spoken_bych() returns data.frame ───
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:27:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken_bych("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:34:3'): get_text_chr_stage() returns text ───────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:34:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_stage("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:41:3'): get_text_chr_stage_with_sp() returns text ───────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:41:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_stage_with_sp(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
[ FAIL 34 | WARN 0 | SKIP 0 | PASS 8 ]
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.0.4
Check: examples
Result: ERROR
Running examples in ‘rdracor-Ex.R’ failed
The error most likely occurred in:
> ### Name: dracor_api
> ### Title: Send a GET request to DraCor API and parse the results
> ### Aliases: dracor_api
>
> ### ** Examples
>
> dracor_api("https://dracor.org/api/v1/info", expected_type = "application/json")
Problem with server occured:
improper data returned:
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [dracor.org]: Resolving timed out after 10001 milliseconds
Error in if (resp$status_code == 404) { : argument is of length zero
Calls: dracor_api -> dracor_error
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 1.0.4
Check: tests
Result: ERROR
Running ‘testthat.R’ [7s/384s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(rdracor)
>
> test_check("rdracor")
DraCor API was not found:
[ FAIL 34 | WARN 0 | SKIP 0 | PASS 8 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-core.R:21:3'): dracor_sparql() returns xml_document by default ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-core.R:21:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql("SELECT * WHERE {?s ?p ?o} LIMIT 10")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:28:3'): dracor_sparql() returns character with parse = FALSE ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-core.R:28:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:37:3'): dracor_sparql() returns xml_document ────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-core.R:37:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql("SELECT * WHERE {?s ?p ?o} LIMIT 10")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:44:3'): dracor_sparql() with parse = FALSE returns character ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-core.R:44:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:53:3'): dracor_api_info returns NULL ────────────────────
Error in `cat("DraCor API was not found:\n", e)`: argument 2 (type 'list') cannot be handled by 'cat'
Backtrace:
▆
1. ├─testthat::expect_invisible(dracor_api_info()) at test-core.R:53:3
2. │ └─base::withVisible(call)
3. └─rdracor::dracor_api_info()
4. └─base::tryCatch(...)
5. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
6. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
7. └─value[[3L]](cond)
8. └─base::cat("DraCor API was not found:\n", e)
── Error ('test-core.R:53:3'): dracor_api_info returns NULL ────────────────────
Error in `dracor_api_info()`: object 'api_info_list' not found
Backtrace:
▆
1. ├─testthat::expect_invisible(dracor_api_info()) at test-core.R:53:3
2. │ └─base::withVisible(call)
3. └─rdracor::dracor_api_info()
4. ├─base::tryCatch(...)
5. ├─base::cat(...)
6. └─base::paste(...)
── Error ('test-dracor.R:2:3'): Cal corpus is S3 class 'dracor' ────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor("cal"), "dracor") at test-dracor.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor("cal")
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:11:3'): several corpora are downloaded via get_dracor() if character vector
is provided ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor(c("tat", "span")), "tbl_df") at test-dracor.R:11:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor(c("tat", "span"))
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:15:3'): is.dracor() works for 'dracor' object ─────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(is.dracor(get_dracor("cal"))) at test-dracor.R:15:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor:::is.dracor(get_dracor("cal"))
5. └─rdracor::get_dracor("cal")
6. └─rdracor:::get_available_corpus_names()
7. └─rdracor::get_dracor_meta()
8. ├─rdracor:::dracor_meta(...)
9. │ └─utils::type.convert(...)
10. └─rdracor::dracor_api(...)
11. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:25:5'): summary() work for 'dracor' object if there is no info on some years ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(...) at test-dracor.R:25:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nchar(capture.output(summary(get_dracor("tat"))))
5. ├─utils::capture.output(summary(get_dracor("tat")))
6. │ └─base::withVisible(...elt(i))
7. ├─base::summary(get_dracor("tat"))
8. └─rdracor::get_dracor("tat")
9. └─rdracor:::get_available_corpus_names()
10. └─rdracor::get_dracor_meta()
11. ├─rdracor:::dracor_meta(...)
12. │ └─utils::type.convert(...)
13. └─rdracor::dracor_api(...)
14. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:35:5'): Written year with format 'YYYY/YYYY' is processed as integer in column
yearWrittenFinish ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_is(get_dracor("rus")$yearWrittenFinish, "integer") at test-dracor.R:35:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor("rus")
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:40:3'): get_character_plays() for Maria Stuart returns at least 2 plays ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_gte(...) at test-dracor.R:40:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nrow(get_character_plays(char_wiki_id = "Q131412"))
5. └─rdracor::get_character_plays(char_wiki_id = "Q131412")
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:2:3'): get_dracor_meta() returns dracor_meta object ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor_meta(), "dracor_meta") at test-dracor_meta.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor_meta()
5. ├─rdracor:::dracor_meta(...)
6. │ └─utils::type.convert(...)
7. └─rdracor::dracor_api(...)
8. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:6:3'): is.dracor_meta() works for 'dracor_meta' object ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(is.dracor_meta(get_dracor_meta())) at test-dracor_meta.R:6:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor:::is.dracor_meta(get_dracor_meta())
5. └─rdracor::get_dracor_meta()
6. ├─rdracor:::dracor_meta(...)
7. │ └─utils::type.convert(...)
8. └─rdracor::dracor_api(...)
9. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:14:3'): summary for dracor_meta object is visible ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_dracor_meta() at test-dracor_meta.R:14:3
2. ├─rdracor:::dracor_meta(...)
3. │ └─utils::type.convert(...)
4. └─rdracor::dracor_api(...)
5. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:2:3'): get_net_cooccur_metrics returns list ──────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-net.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_metrics("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:6:3'): column names for get_net_cooccur_edges() are valid ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-net.R:6:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_edges("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:13:3'): get_net_cooccur_gexf() returns valid object ──────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_gexf("pushkin-boris-godunov", "rus") at test-net.R:13:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:23:3'): cooccur_igraph is returned by get_net_cooccur_igraph() ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-net.R:23:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_igraph("gogol-zhenitba", "rus")
5. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:30:3'): label_cooccur_igraph() return come NA for big network ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:30:3
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:37:5'): label_cooccur_igraph() do not return NA after max_graph_size adjustment ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:37:5
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:43:3'): summary.cooccur_igraph() prints appropriate number of rows ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:43:3
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:48:3'): relations_igraph is returned by get_net_relations_igraph() ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-net.R:48:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_relations_igraph("gogol-zhenitba", "rus")
5. └─rdracor::get_net_relations_edges(...)
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:2:3'): get_play_metadata returns list ───────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-play.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_play_metadata("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:6:3'): rdf is not empty ─────────────────────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_play_rdf("pushkin-boris-godunov", "rus") at test-play.R:6:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:12:3'): boris godunov has 79 characters ─────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-play.R:12:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nrow(get_play_characters("pushkin-boris-godunov", "rus"))
5. └─rdracor::get_play_characters("pushkin-boris-godunov", "rus")
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-tei_to_df.R:2:3'): tei_to_df converts tei object to tibble ─────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-tei_to_df.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor::tei_to_df(get_text_tei(corpus = "rus", play = "gogol-zhenitba"))
5. │ └─tei %>% xml2::xml_ns_strip()
6. ├─xml2::xml_ns_strip(.)
7. │ └─xml2::xml_find_all(x, "//namespace::*[name()='']/parent::*")
8. └─rdracor::get_text_tei(corpus = "rus", play = "gogol-zhenitba")
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-tei_to_df.R:9:3'): get_text_df returns tibble ──────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-tei_to_df.R:9:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor::get_text_df(corpus = "rus", play = "gogol-zhenitba")
5. │ ├─get_text_tei(play = play, corpus = corpus) %>% tei_to_df()
6. │ └─rdracor::get_text_tei(play = play, corpus = corpus)
7. │ └─rdracor::dracor_api(...)
8. │ └─rdracor:::dracor_error(resp)
9. ├─rdracor::tei_to_df(.)
10. │ └─tei %>% xml2::xml_ns_strip()
11. └─xml2::xml_ns_strip(.)
12. └─xml2::xml_find_all(x, "//namespace::*[name()='']/parent::*")
── Error ('test-text.R:2:3'): tei text is not empty ────────────────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_text_tei("pushkin-boris-godunov", "rus") at test-text.R:2:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:8:3'): get_text_chr_spoken() returns text ───────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:8:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:17:5'): get_text_chr_spoken() for Boris Godunov, UNKNOWN gender returns more than one value ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_gt(...) at test-text.R:17:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:27:3'): get_text_chr_spoken_bych() returns data.frame ───
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:27:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken_bych("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:34:3'): get_text_chr_stage() returns text ───────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:34:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_stage("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:41:3'): get_text_chr_stage_with_sp() returns text ───────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:41:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_stage_with_sp(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
[ FAIL 34 | WARN 0 | SKIP 0 | PASS 8 ]
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 1.0.4
Check: examples
Result: ERROR
Running examples in ‘rdracor-Ex.R’ failed
The error most likely occurred in:
> ### Name: dracor_api
> ### Title: Send a GET request to DraCor API and parse the results
> ### Aliases: dracor_api
>
> ### ** Examples
>
> dracor_api("https://dracor.org/api/v1/info", expected_type = "application/json")
Problem with server occured:
improper data returned:
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [dracor.org]: Connection timeout after 10000 ms
Error in if (resp$status_code == 404) { : argument is of length zero
Calls: dracor_api -> dracor_error
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc
Version: 1.0.4
Check: tests
Result: ERROR
Running ‘testthat.R’ [6s/349s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(rdracor)
>
> test_check("rdracor")
DraCor API was not found:
[ FAIL 34 | WARN 0 | SKIP 0 | PASS 8 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-core.R:21:3'): dracor_sparql() returns xml_document by default ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-core.R:21:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql("SELECT * WHERE {?s ?p ?o} LIMIT 10")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:28:3'): dracor_sparql() returns character with parse = FALSE ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-core.R:28:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:37:3'): dracor_sparql() returns xml_document ────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-core.R:37:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql("SELECT * WHERE {?s ?p ?o} LIMIT 10")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:44:3'): dracor_sparql() with parse = FALSE returns character ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-core.R:44:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:53:3'): dracor_api_info returns NULL ────────────────────
Error in `cat("DraCor API was not found:\n", e)`: argument 2 (type 'list') cannot be handled by 'cat'
Backtrace:
▆
1. ├─testthat::expect_invisible(dracor_api_info()) at test-core.R:53:3
2. │ └─base::withVisible(call)
3. └─rdracor::dracor_api_info()
4. └─base::tryCatch(...)
5. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
6. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
7. └─value[[3L]](cond)
8. └─base::cat("DraCor API was not found:\n", e)
── Error ('test-core.R:53:3'): dracor_api_info returns NULL ────────────────────
Error in `dracor_api_info()`: object 'api_info_list' not found
Backtrace:
▆
1. ├─testthat::expect_invisible(dracor_api_info()) at test-core.R:53:3
2. │ └─base::withVisible(call)
3. └─rdracor::dracor_api_info()
4. ├─base::tryCatch(...)
5. ├─base::cat(...)
6. └─base::paste(...)
── Error ('test-dracor.R:2:3'): Cal corpus is S3 class 'dracor' ────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor("cal"), "dracor") at test-dracor.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor("cal")
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:11:3'): several corpora are downloaded via get_dracor() if character vector
is provided ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor(c("tat", "span")), "tbl_df") at test-dracor.R:11:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor(c("tat", "span"))
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:15:3'): is.dracor() works for 'dracor' object ─────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(is.dracor(get_dracor("cal"))) at test-dracor.R:15:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor:::is.dracor(get_dracor("cal"))
5. └─rdracor::get_dracor("cal")
6. └─rdracor:::get_available_corpus_names()
7. └─rdracor::get_dracor_meta()
8. ├─rdracor:::dracor_meta(...)
9. │ └─utils::type.convert(...)
10. └─rdracor::dracor_api(...)
11. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:25:5'): summary() work for 'dracor' object if there is no info on some years ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(...) at test-dracor.R:25:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nchar(capture.output(summary(get_dracor("tat"))))
5. ├─utils::capture.output(summary(get_dracor("tat")))
6. │ └─base::withVisible(...elt(i))
7. ├─base::summary(get_dracor("tat"))
8. └─rdracor::get_dracor("tat")
9. └─rdracor:::get_available_corpus_names()
10. └─rdracor::get_dracor_meta()
11. ├─rdracor:::dracor_meta(...)
12. │ └─utils::type.convert(...)
13. └─rdracor::dracor_api(...)
14. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:35:5'): Written year with format 'YYYY/YYYY' is processed as integer in column
yearWrittenFinish ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_is(get_dracor("rus")$yearWrittenFinish, "integer") at test-dracor.R:35:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor("rus")
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:40:3'): get_character_plays() for Maria Stuart returns at least 2 plays ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_gte(...) at test-dracor.R:40:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nrow(get_character_plays(char_wiki_id = "Q131412"))
5. └─rdracor::get_character_plays(char_wiki_id = "Q131412")
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:2:3'): get_dracor_meta() returns dracor_meta object ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor_meta(), "dracor_meta") at test-dracor_meta.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor_meta()
5. ├─rdracor:::dracor_meta(...)
6. │ └─utils::type.convert(...)
7. └─rdracor::dracor_api(...)
8. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:6:3'): is.dracor_meta() works for 'dracor_meta' object ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(is.dracor_meta(get_dracor_meta())) at test-dracor_meta.R:6:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor:::is.dracor_meta(get_dracor_meta())
5. └─rdracor::get_dracor_meta()
6. ├─rdracor:::dracor_meta(...)
7. │ └─utils::type.convert(...)
8. └─rdracor::dracor_api(...)
9. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:14:3'): summary for dracor_meta object is visible ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_dracor_meta() at test-dracor_meta.R:14:3
2. ├─rdracor:::dracor_meta(...)
3. │ └─utils::type.convert(...)
4. └─rdracor::dracor_api(...)
5. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:2:3'): get_net_cooccur_metrics returns list ──────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-net.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_metrics("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:6:3'): column names for get_net_cooccur_edges() are valid ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-net.R:6:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_edges("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:13:3'): get_net_cooccur_gexf() returns valid object ──────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_gexf("pushkin-boris-godunov", "rus") at test-net.R:13:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:23:3'): cooccur_igraph is returned by get_net_cooccur_igraph() ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-net.R:23:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_igraph("gogol-zhenitba", "rus")
5. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:30:3'): label_cooccur_igraph() return come NA for big network ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:30:3
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:37:5'): label_cooccur_igraph() do not return NA after max_graph_size adjustment ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:37:5
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:43:3'): summary.cooccur_igraph() prints appropriate number of rows ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:43:3
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:48:3'): relations_igraph is returned by get_net_relations_igraph() ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-net.R:48:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_relations_igraph("gogol-zhenitba", "rus")
5. └─rdracor::get_net_relations_edges(...)
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:2:3'): get_play_metadata returns list ───────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-play.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_play_metadata("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:6:3'): rdf is not empty ─────────────────────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_play_rdf("pushkin-boris-godunov", "rus") at test-play.R:6:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:12:3'): boris godunov has 79 characters ─────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-play.R:12:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nrow(get_play_characters("pushkin-boris-godunov", "rus"))
5. └─rdracor::get_play_characters("pushkin-boris-godunov", "rus")
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-tei_to_df.R:2:3'): tei_to_df converts tei object to tibble ─────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-tei_to_df.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor::tei_to_df(get_text_tei(corpus = "rus", play = "gogol-zhenitba"))
5. │ └─tei %>% xml2::xml_ns_strip()
6. ├─xml2::xml_ns_strip(.)
7. │ └─xml2::xml_find_all(x, "//namespace::*[name()='']/parent::*")
8. └─rdracor::get_text_tei(corpus = "rus", play = "gogol-zhenitba")
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-tei_to_df.R:9:3'): get_text_df returns tibble ──────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-tei_to_df.R:9:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor::get_text_df(corpus = "rus", play = "gogol-zhenitba")
5. │ ├─get_text_tei(play = play, corpus = corpus) %>% tei_to_df()
6. │ └─rdracor::get_text_tei(play = play, corpus = corpus)
7. │ └─rdracor::dracor_api(...)
8. │ └─rdracor:::dracor_error(resp)
9. ├─rdracor::tei_to_df(.)
10. │ └─tei %>% xml2::xml_ns_strip()
11. └─xml2::xml_ns_strip(.)
12. └─xml2::xml_find_all(x, "//namespace::*[name()='']/parent::*")
── Error ('test-text.R:2:3'): tei text is not empty ────────────────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_text_tei("pushkin-boris-godunov", "rus") at test-text.R:2:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:8:3'): get_text_chr_spoken() returns text ───────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:8:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:17:5'): get_text_chr_spoken() for Boris Godunov, UNKNOWN gender returns more than one value ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_gt(...) at test-text.R:17:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:27:3'): get_text_chr_spoken_bych() returns data.frame ───
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:27:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken_bych("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:34:3'): get_text_chr_stage() returns text ───────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:34:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_stage("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:41:3'): get_text_chr_stage_with_sp() returns text ───────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:41:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_stage_with_sp(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
[ FAIL 34 | WARN 0 | SKIP 0 | PASS 8 ]
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc
Version: 1.0.4
Check: examples
Result: ERROR
Running examples in 'rdracor-Ex.R' failed
The error most likely occurred in:
> ### Name: dracor_api_info
> ### Title: Retrieve 'DraCor' API info
> ### Aliases: dracor_api_info get_dracor_api_url set_dracor_api_url
>
> ### ** Examples
>
> dracor_api_info()
DraCor API URL: https://dracor.org/api/v1
name: DraCor API v1
version: 1.0.2
status: stable
existdb: 6.2.0
base: https://dracor.org/api/v1> dracor_api_info("https://staging.dracor.org/api")
Problem with server occured:
improper data returned:
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [staging.dracor.org]: Failed to connect to staging.dracor.org port 443 after 10013 ms: Timeout was reached
DraCor API was not found:
Error in cat("DraCor API was not found:\n", e) :
argument 2 (type 'list') cannot be handled by 'cat'
Calls: dracor_api_info ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> -> cat
Error in dracor_api_info("https://staging.dracor.org/api") :
object 'api_info_list' not found
Calls: dracor_api_info -> tryCatch -> cat -> paste
Execution halted
Flavor: r-devel-windows-x86_64
Version: 1.0.4
Check: examples
Result: ERROR
Running examples in 'rdracor-Ex.R' failed
The error most likely occurred in:
> ### Name: dracor_api
> ### Title: Send a GET request to DraCor API and parse the results
> ### Aliases: dracor_api
>
> ### ** Examples
>
> dracor_api("https://dracor.org/api/v1/info", expected_type = "application/json")
Problem with server occured:
improper data returned:
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [dracor.org]: Failed to connect to dracor.org port 443 after 10009 ms: Timeout was reached
Error in if (resp$status_code == 404) { : argument is of length zero
Calls: dracor_api -> dracor_error
Execution halted
Flavor: r-release-windows-x86_64
Version: 1.0.4
Check: tests
Result: ERROR
Running 'testthat.R' [344s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(rdracor)
>
> test_check("rdracor")
DraCor API was not found:
[ FAIL 34 | WARN 0 | SKIP 0 | PASS 8 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-core.R:21:3'): dracor_sparql() returns xml_document by default ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-core.R:21:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql("SELECT * WHERE {?s ?p ?o} LIMIT 10")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:28:3'): dracor_sparql() returns character with parse = FALSE ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-core.R:28:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:37:3'): dracor_sparql() returns xml_document ────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-core.R:37:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql("SELECT * WHERE {?s ?p ?o} LIMIT 10")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:44:3'): dracor_sparql() with parse = FALSE returns character ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-core.R:44:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:53:3'): dracor_api_info returns NULL ────────────────────
Error in `cat("DraCor API was not found:\n", e)`: argument 2 (type 'list') cannot be handled by 'cat'
Backtrace:
▆
1. ├─testthat::expect_invisible(dracor_api_info()) at test-core.R:53:3
2. │ └─base::withVisible(call)
3. └─rdracor::dracor_api_info()
4. └─base::tryCatch(...)
5. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
6. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
7. └─value[[3L]](cond)
8. └─base::cat("DraCor API was not found:\n", e)
── Error ('test-core.R:53:3'): dracor_api_info returns NULL ────────────────────
Error in `dracor_api_info()`: object 'api_info_list' not found
Backtrace:
▆
1. ├─testthat::expect_invisible(dracor_api_info()) at test-core.R:53:3
2. │ └─base::withVisible(call)
3. └─rdracor::dracor_api_info()
4. ├─base::tryCatch(...)
5. ├─base::cat(...)
6. └─base::paste(...)
── Error ('test-dracor.R:2:3'): Cal corpus is S3 class 'dracor' ────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor("cal"), "dracor") at test-dracor.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor("cal")
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:11:3'): several corpora are downloaded via get_dracor() if character vector
is provided ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor(c("tat", "span")), "tbl_df") at test-dracor.R:11:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor(c("tat", "span"))
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:15:3'): is.dracor() works for 'dracor' object ─────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(is.dracor(get_dracor("cal"))) at test-dracor.R:15:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor:::is.dracor(get_dracor("cal"))
5. └─rdracor::get_dracor("cal")
6. └─rdracor:::get_available_corpus_names()
7. └─rdracor::get_dracor_meta()
8. ├─rdracor:::dracor_meta(...)
9. │ └─utils::type.convert(...)
10. └─rdracor::dracor_api(...)
11. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:25:5'): summary() work for 'dracor' object if there is no info on some years ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(...) at test-dracor.R:25:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nchar(capture.output(summary(get_dracor("tat"))))
5. ├─utils::capture.output(summary(get_dracor("tat")))
6. │ └─base::withVisible(...elt(i))
7. ├─base::summary(get_dracor("tat"))
8. └─rdracor::get_dracor("tat")
9. └─rdracor:::get_available_corpus_names()
10. └─rdracor::get_dracor_meta()
11. ├─rdracor:::dracor_meta(...)
12. │ └─utils::type.convert(...)
13. └─rdracor::dracor_api(...)
14. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:35:5'): Written year with format 'YYYY/YYYY' is processed as integer in column
yearWrittenFinish ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_is(get_dracor("rus")$yearWrittenFinish, "integer") at test-dracor.R:35:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor("rus")
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:40:3'): get_character_plays() for Maria Stuart returns at least 2 plays ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_gte(...) at test-dracor.R:40:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nrow(get_character_plays(char_wiki_id = "Q131412"))
5. └─rdracor::get_character_plays(char_wiki_id = "Q131412")
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:2:3'): get_dracor_meta() returns dracor_meta object ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor_meta(), "dracor_meta") at test-dracor_meta.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor_meta()
5. ├─rdracor:::dracor_meta(...)
6. │ └─utils::type.convert(...)
7. └─rdracor::dracor_api(...)
8. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:6:3'): is.dracor_meta() works for 'dracor_meta' object ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(is.dracor_meta(get_dracor_meta())) at test-dracor_meta.R:6:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor:::is.dracor_meta(get_dracor_meta())
5. └─rdracor::get_dracor_meta()
6. ├─rdracor:::dracor_meta(...)
7. │ └─utils::type.convert(...)
8. └─rdracor::dracor_api(...)
9. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:14:3'): summary for dracor_meta object is visible ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_dracor_meta() at test-dracor_meta.R:14:3
2. ├─rdracor:::dracor_meta(...)
3. │ └─utils::type.convert(...)
4. └─rdracor::dracor_api(...)
5. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:2:3'): get_net_cooccur_metrics returns list ──────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-net.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_metrics("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:6:3'): column names for get_net_cooccur_edges() are valid ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-net.R:6:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_edges("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:13:3'): get_net_cooccur_gexf() returns valid object ──────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_gexf("pushkin-boris-godunov", "rus") at test-net.R:13:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:23:3'): cooccur_igraph is returned by get_net_cooccur_igraph() ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-net.R:23:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_igraph("gogol-zhenitba", "rus")
5. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:30:3'): label_cooccur_igraph() return come NA for big network ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:30:3
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:37:5'): label_cooccur_igraph() do not return NA after max_graph_size adjustment ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:37:5
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:43:3'): summary.cooccur_igraph() prints appropriate number of rows ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:43:3
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:48:3'): relations_igraph is returned by get_net_relations_igraph() ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-net.R:48:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_relations_igraph("gogol-zhenitba", "rus")
5. └─rdracor::get_net_relations_edges(...)
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:2:3'): get_play_metadata returns list ───────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-play.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_play_metadata("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:6:3'): rdf is not empty ─────────────────────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_play_rdf("pushkin-boris-godunov", "rus") at test-play.R:6:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:12:3'): boris godunov has 79 characters ─────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-play.R:12:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nrow(get_play_characters("pushkin-boris-godunov", "rus"))
5. └─rdracor::get_play_characters("pushkin-boris-godunov", "rus")
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-tei_to_df.R:2:3'): tei_to_df converts tei object to tibble ─────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-tei_to_df.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor::tei_to_df(get_text_tei(corpus = "rus", play = "gogol-zhenitba"))
5. │ └─tei %>% xml2::xml_ns_strip()
6. ├─xml2::xml_ns_strip(.)
7. │ └─xml2::xml_find_all(x, "//namespace::*[name()='']/parent::*")
8. └─rdracor::get_text_tei(corpus = "rus", play = "gogol-zhenitba")
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-tei_to_df.R:9:3'): get_text_df returns tibble ──────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-tei_to_df.R:9:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor::get_text_df(corpus = "rus", play = "gogol-zhenitba")
5. │ ├─get_text_tei(play = play, corpus = corpus) %>% tei_to_df()
6. │ └─rdracor::get_text_tei(play = play, corpus = corpus)
7. │ └─rdracor::dracor_api(...)
8. │ └─rdracor:::dracor_error(resp)
9. ├─rdracor::tei_to_df(.)
10. │ └─tei %>% xml2::xml_ns_strip()
11. └─xml2::xml_ns_strip(.)
12. └─xml2::xml_find_all(x, "//namespace::*[name()='']/parent::*")
── Error ('test-text.R:2:3'): tei text is not empty ────────────────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_text_tei("pushkin-boris-godunov", "rus") at test-text.R:2:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:8:3'): get_text_chr_spoken() returns text ───────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:8:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:17:5'): get_text_chr_spoken() for Boris Godunov, UNKNOWN gender returns more than one value ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_gt(...) at test-text.R:17:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:27:3'): get_text_chr_spoken_bych() returns data.frame ───
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:27:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken_bych("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:34:3'): get_text_chr_stage() returns text ───────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:34:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_stage("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:41:3'): get_text_chr_stage_with_sp() returns text ───────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:41:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_stage_with_sp(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
[ FAIL 34 | WARN 0 | SKIP 0 | PASS 8 ]
Error: Test failures
Execution halted
Flavor: r-release-windows-x86_64
Version: 1.0.4
Check: examples
Result: ERROR
Running examples in 'rdracor-Ex.R' failed
The error most likely occurred in:
> ### Name: dracor_api
> ### Title: Send a GET request to DraCor API and parse the results
> ### Aliases: dracor_api
>
> ### ** Examples
>
> dracor_api("https://dracor.org/api/v1/info", expected_type = "application/json")
Problem with server occured:
improper data returned:
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [dracor.org]: Failed to connect to dracor.org port 443 after 10002 ms: Timeout was reached
Error in if (resp$status_code == 404) { : argument is of length zero
Calls: dracor_api -> dracor_error
Execution halted
Flavor: r-oldrel-windows-x86_64
Version: 1.0.4
Check: tests
Result: ERROR
Running 'testthat.R' [345s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(rdracor)
>
> test_check("rdracor")
DraCor API was not found:
[ FAIL 34 | WARN 0 | SKIP 0 | PASS 8 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-core.R:21:3'): dracor_sparql() returns xml_document by default ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-core.R:21:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql("SELECT * WHERE {?s ?p ?o} LIMIT 10")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:28:3'): dracor_sparql() returns character with parse = FALSE ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-core.R:28:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:37:3'): dracor_sparql() returns xml_document ────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-core.R:37:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql("SELECT * WHERE {?s ?p ?o} LIMIT 10")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:44:3'): dracor_sparql() with parse = FALSE returns character ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-core.R:44:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::dracor_sparql(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-core.R:53:3'): dracor_api_info returns NULL ────────────────────
Error in `cat("DraCor API was not found:\n", e)`: argument 2 (type 'list') cannot be handled by 'cat'
Backtrace:
▆
1. ├─testthat::expect_invisible(dracor_api_info()) at test-core.R:53:3
2. │ └─base::withVisible(call)
3. └─rdracor::dracor_api_info()
4. └─base::tryCatch(...)
5. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
6. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
7. └─value[[3L]](cond)
8. └─base::cat("DraCor API was not found:\n", e)
── Error ('test-core.R:53:3'): dracor_api_info returns NULL ────────────────────
Error in `dracor_api_info()`: object 'api_info_list' not found
Backtrace:
▆
1. ├─testthat::expect_invisible(dracor_api_info()) at test-core.R:53:3
2. │ └─base::withVisible(call)
3. └─rdracor::dracor_api_info()
4. ├─base::tryCatch(...)
5. ├─base::cat(...)
6. └─base::paste(...)
── Error ('test-dracor.R:2:3'): Cal corpus is S3 class 'dracor' ────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor("cal"), "dracor") at test-dracor.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor("cal")
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:11:3'): several corpora are downloaded via get_dracor() if character vector
is provided ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor(c("tat", "span")), "tbl_df") at test-dracor.R:11:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor(c("tat", "span"))
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:15:3'): is.dracor() works for 'dracor' object ─────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(is.dracor(get_dracor("cal"))) at test-dracor.R:15:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor:::is.dracor(get_dracor("cal"))
5. └─rdracor::get_dracor("cal")
6. └─rdracor:::get_available_corpus_names()
7. └─rdracor::get_dracor_meta()
8. ├─rdracor:::dracor_meta(...)
9. │ └─utils::type.convert(...)
10. └─rdracor::dracor_api(...)
11. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:25:5'): summary() work for 'dracor' object if there is no info on some years ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(...) at test-dracor.R:25:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nchar(capture.output(summary(get_dracor("tat"))))
5. ├─utils::capture.output(summary(get_dracor("tat")))
6. │ └─base::withVisible(...elt(i))
7. ├─base::summary(get_dracor("tat"))
8. └─rdracor::get_dracor("tat")
9. └─rdracor:::get_available_corpus_names()
10. └─rdracor::get_dracor_meta()
11. ├─rdracor:::dracor_meta(...)
12. │ └─utils::type.convert(...)
13. └─rdracor::dracor_api(...)
14. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:35:5'): Written year with format 'YYYY/YYYY' is processed as integer in column
yearWrittenFinish ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_is(get_dracor("rus")$yearWrittenFinish, "integer") at test-dracor.R:35:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor("rus")
5. └─rdracor:::get_available_corpus_names()
6. └─rdracor::get_dracor_meta()
7. ├─rdracor:::dracor_meta(...)
8. │ └─utils::type.convert(...)
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-dracor.R:40:3'): get_character_plays() for Maria Stuart returns at least 2 plays ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_gte(...) at test-dracor.R:40:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nrow(get_character_plays(char_wiki_id = "Q131412"))
5. └─rdracor::get_character_plays(char_wiki_id = "Q131412")
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:2:3'): get_dracor_meta() returns dracor_meta object ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(get_dracor_meta(), "dracor_meta") at test-dracor_meta.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_dracor_meta()
5. ├─rdracor:::dracor_meta(...)
6. │ └─utils::type.convert(...)
7. └─rdracor::dracor_api(...)
8. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:6:3'): is.dracor_meta() works for 'dracor_meta' object ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_true(is.dracor_meta(get_dracor_meta())) at test-dracor_meta.R:6:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor:::is.dracor_meta(get_dracor_meta())
5. └─rdracor::get_dracor_meta()
6. ├─rdracor:::dracor_meta(...)
7. │ └─utils::type.convert(...)
8. └─rdracor::dracor_api(...)
9. └─rdracor:::dracor_error(resp)
── Error ('test-dracor_meta.R:14:3'): summary for dracor_meta object is visible ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_dracor_meta() at test-dracor_meta.R:14:3
2. ├─rdracor:::dracor_meta(...)
3. │ └─utils::type.convert(...)
4. └─rdracor::dracor_api(...)
5. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:2:3'): get_net_cooccur_metrics returns list ──────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-net.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_metrics("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:6:3'): column names for get_net_cooccur_edges() are valid ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-net.R:6:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_edges("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:13:3'): get_net_cooccur_gexf() returns valid object ──────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_gexf("pushkin-boris-godunov", "rus") at test-net.R:13:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:23:3'): cooccur_igraph is returned by get_net_cooccur_igraph() ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-net.R:23:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_cooccur_igraph("gogol-zhenitba", "rus")
5. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:30:3'): label_cooccur_igraph() return come NA for big network ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:30:3
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:37:5'): label_cooccur_igraph() do not return NA after max_graph_size adjustment ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:37:5
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:43:3'): summary.cooccur_igraph() prints appropriate number of rows ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_net_cooccur_igraph("henry-iv-part-1", "shake") at test-net.R:43:3
2. └─rdracor::get_play_characters(play = play, corpus = corpus, as_tibble = FALSE)
3. └─rdracor::dracor_api(...)
4. └─rdracor:::dracor_error(resp)
── Error ('test-net.R:48:3'): relations_igraph is returned by get_net_relations_igraph() ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-net.R:48:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_net_relations_igraph("gogol-zhenitba", "rus")
5. └─rdracor::get_net_relations_edges(...)
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:2:3'): get_play_metadata returns list ───────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-play.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_play_metadata("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:6:3'): rdf is not empty ─────────────────────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_play_rdf("pushkin-boris-godunov", "rus") at test-play.R:6:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-play.R:12:3'): boris godunov has 79 characters ─────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-play.R:12:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::nrow(get_play_characters("pushkin-boris-godunov", "rus"))
5. └─rdracor::get_play_characters("pushkin-boris-godunov", "rus")
6. └─rdracor::dracor_api(...)
7. └─rdracor:::dracor_error(resp)
── Error ('test-tei_to_df.R:2:3'): tei_to_df converts tei object to tibble ─────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-tei_to_df.R:2:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor::tei_to_df(get_text_tei(corpus = "rus", play = "gogol-zhenitba"))
5. │ └─tei %>% xml2::xml_ns_strip()
6. ├─xml2::xml_ns_strip(.)
7. │ └─xml2::xml_find_all(x, "//namespace::*[name()='']/parent::*")
8. └─rdracor::get_text_tei(corpus = "rus", play = "gogol-zhenitba")
9. └─rdracor::dracor_api(...)
10. └─rdracor:::dracor_error(resp)
── Error ('test-tei_to_df.R:9:3'): get_text_df returns tibble ──────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_s3_class(...) at test-tei_to_df.R:9:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─rdracor::get_text_df(corpus = "rus", play = "gogol-zhenitba")
5. │ ├─get_text_tei(play = play, corpus = corpus) %>% tei_to_df()
6. │ └─rdracor::get_text_tei(play = play, corpus = corpus)
7. │ └─rdracor::dracor_api(...)
8. │ └─rdracor:::dracor_error(resp)
9. ├─rdracor::tei_to_df(.)
10. │ └─tei %>% xml2::xml_ns_strip()
11. └─xml2::xml_ns_strip(.)
12. └─xml2::xml_find_all(x, "//namespace::*[name()='']/parent::*")
── Error ('test-text.R:2:3'): tei text is not empty ────────────────────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. └─rdracor::get_text_tei("pushkin-boris-godunov", "rus") at test-text.R:2:3
2. └─rdracor::dracor_api(...)
3. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:8:3'): get_text_chr_spoken() returns text ───────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:8:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:17:5'): get_text_chr_spoken() for Boris Godunov, UNKNOWN gender returns more than one value ──
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_gt(...) at test-text.R:17:5
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:27:3'): get_text_chr_spoken_bych() returns data.frame ───
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:27:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_spoken_bych("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:34:3'): get_text_chr_stage() returns text ───────────────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:34:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_stage("pushkin-boris-godunov", "rus")
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
── Error ('test-text.R:41:3'): get_text_chr_stage_with_sp() returns text ───────
Error in `if (resp$status_code == 404) {
stop(sprintf("Status code - %i: Wrong Dracor API request - data were not found",
resp$status_code))
} else if (resp$status_code == 400) {
stop(sprintf("Status code - %i: Wrong Dracor API request - invalid request",
resp$status_code))
} else if (resp$status_code >= 500) {
stop(sprintf("Status code - %i: Internal Dracor server problem",
resp$status_code))
} else if (resp$status_code != 200) {
stop(sprintf("Status code - %i: Unknown problem", resp$status_code))
}`: argument is of length zero
Backtrace:
▆
1. ├─testthat::expect_type(...) at test-text.R:41:3
2. │ └─testthat::quasi_label(enquo(object), arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─rdracor::get_text_chr_stage_with_sp(...)
5. └─rdracor::dracor_api(...)
6. └─rdracor:::dracor_error(resp)
[ FAIL 34 | WARN 0 | SKIP 0 | PASS 8 ]
Error: Test failures
Execution halted
Flavor: r-oldrel-windows-x86_64