Git Product home page Git Product logo

Comments (4)

yutannihilation avatar yutannihilation commented on September 21, 2024

Could you provide a reproducible example? This seems an issue of compatibility with the new editor format, but I can't figure out what's happening without knowing the details.

from conflr.

malexan avatar malexan commented on September 21, 2024

In my case, the problem appears when I add caption to knitr::kable(). Without the caption argument the function works as expected.

---
title: "Conflr debug"
author: "Alexander Matrunich"
date: '`r format(Sys.Date(), "%d %B, %Y")`'
output: 
  conflr::confluence_document:
    parent_id: "000000"
    space_key: "YYYYY"
    update: true
    code_folding: hide
    toc: false
---


Hello!


```{r testchunk, warning=FALSE}
cars |> 
  knitr::kable(
    caption = "Table caption",
    digits = 3
  )
\```

processing file: conflr_debug.Rmd
output file: conflr_debug.knit.md

Checking the existing images...
Uploading the images...
Uploading the document...
Error: Error in paste(httr::http_condition(res, type = "error"), httr::content(res)): Bad Request (HTTP 400).
 400
* Error in paste(httr::http_condition(res, type = "error"), httr::content(res)): Bad Request (HTTP 400).
 list(authorized = FALSE, valid = TRUE, errors = list(), successful = FALSE)
* Error in paste(httr::http_condition(res, type = "error"), httr::content(res)): Bad Request (HTTP 400).
 com.atlassian.confluence.api.service.exceptions.BadRequestException: Content body cannot be converted to new editor format
Backtrace:
    █
 1. └─rmarkdown::render(...)
 2.   └─output_format$post_processor(...)
 3.     ├─rlang::exec(...)
 4.     └─(function (title, space_key, type, parent_id, html_text, imgs, ...
 5.       └─conflr::confl_update_page(id = id, title = title, body = html_text)
 6.         └─conflr:::confl_verb(...)
Execution halted

from conflr.

yutannihilation avatar yutannihilation commented on September 21, 2024

Thanks for the reproducible example!! This is really helpful.

from conflr.

KevinHRea avatar KevinHRea commented on September 21, 2024

Hi I am getting a similar error when I try to upload an RNotebook, no captions in
processing file: tmag5170_error.Rmd
|.. | 4%
ordinary text without R code

|.... | 8%
label: unnamed-chunk-1 (with options)
List of 1
$ echo: logi FALSE

|...... | 12%
label: unnamed-chunk-2 (with options)
List of 1
$ echo: logi FALSE

|........ | 15%
ordinary text without R code

|.......... | 19%
label: unnamed-chunk-3 (with options)
List of 1
$ echo: logi FALSE

|............ | 23%
ordinary text without R code

|.............. | 27%
label: unnamed-chunk-4 (with options)
List of 2
$ echo : logi FALSE
$ results: chr "hide"

|................ | 31%
ordinary text without R code

|.................. | 35%
label: unnamed-chunk-5 (with options)
List of 2
$ echo : logi FALSE
$ results: chr "hide"

|.................... | 38%
ordinary text without R code

|...................... | 42%
label: unnamed-chunk-6 (with options)
List of 1
$ echo: logi FALSE

|........................ | 46%
ordinary text without R code

|.......................... | 50%
label: unnamed-chunk-7 (with options)
List of 1
$ echo: logi FALSE

|........................... | 54%
label: unnamed-chunk-8 (with options)
List of 2
$ echo : logi FALSE
$ results: chr "hide"

|............................. | 58%
ordinary text without R code

|............................... | 62%
label: unnamed-chunk-9 (with options)
List of 2
$ echo : logi FALSE
$ results: chr "hide"

|................................. | 65%
ordinary text without R code

|................................... | 69%
label: unnamed-chunk-10 (with options)
List of 1
$ echo: logi FALSE

|..................................... | 73%
label: unnamed-chunk-11 (with options)
List of 2
$ echo : logi FALSE
$ results: chr "hide"

|....................................... | 77%
ordinary text without R code

|......................................... | 81%
label: unnamed-chunk-12 (with options)
List of 2
$ echo : logi FALSE
$ results: chr "hide"

|........................................... | 85%
label: unnamed-chunk-13 (with options)
List of 2
$ echo : logi FALSE
$ results: chr "hide"

|............................................. | 88%
ordinary text without R code

|............................................... | 92%
label: unnamed-chunk-14 (with options)
List of 2
$ echo : logi FALSE
$ results: chr "hide"

|................................................. | 96%
ordinary text without R code

|...................................................| 100%
label: unnamed-chunk-15 (with options)
List of 2
$ echo : logi FALSE
$ results: chr "hide"

output file: tmag5170_error.knit.md

/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS tmag5170_error.knit.md --to commonmark-yaml_metadata_block --from markdown+autolink_bare_uris-tex_math_single_backslash-tex_math_dollars-raw_tex --output tmag5170_error.md --wrap=none
Loading required package: shiny

Listening on http://127.0.0.1:7883
Warning: Error in : Error in paste(httr::http_condition(res, type = "error"), httr::content(res)): Bad Request (HTTP 400).
400

  • Error in paste(httr::http_condition(res, type = "error"), httr::content(res)): Bad Request (HTTP 400).
    list(authorized = FALSE, valid = TRUE, errors = list(), successful = FALSE)
  • Error in paste(httr::http_condition(res, type = "error"), httr::content(res)): Bad Request (HTTP 400).
    com.atlassian.confluence.api.service.exceptions.BadRequestException: Content body cannot be converted to new editor format
    59:

from conflr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.