question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rmarkdown Background Process Failure

See original GitHub issue

System: Fedora 35 (but also failed with Fedora 34)

What happens: Knitting a file in the current R terminal (radian) works fine. When I try to use the extension to preview the resulting file (or if I use the background process i.e., smart knitting) to knit my rmarkdown file, I instead get the following error

Error in cat(lim, eval(parse(text = knit_command)), lim, sep = "") : 
  object 'lim' not found

Which I deduce from vscode-R/R/rmarkdown/knit.R has to do with the line

lim <- Sys.getenv("VSCR_LIM")

The same also occurs with a “fresh” install of VSCode (deleting all config / extensions, loading the vscode-R extension only). Maybe some explanation of the logic in the knit.R file can assist in debugging.

EDIT: The extension was previously working fine for me. Possibly this recent PR #784 broke functionality for me. Confirmed that reverting to extension version 2.2.0 fixed this functionality regression for me.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
ElianHughcommented, Apr 4, 2022

Hi again @AndrewCSQ and @Albatrosses-reply, the latest push to the repo should have fixed this issue. If you find you still run into it, please feel free to open!

1reaction
Albatrosses-replycommented, Mar 15, 2022

HI, i had a similar issue.

Error in cat(lim, rmarkdown::render(file_path, output_format = set_html, : object 'lim' not found

Likewise, when I downgraded to 2.2.0, it worked normally. Will it be able to be fixed through an upgrade in the future?

Read more comments on GitHub >

github_iconTop Results From Across the Web

15 Common Problems with rmarkdown (and some solutions)
15.1 Avoiding problems · restart R · run all chunks below · find the chunk that did not work, fix until it does...
Read more >
what to tell colleagues who don't want to wait for knitr
Even with background knitting, there's still the issue of long running code that takes hours or days to complete. If a user just...
Read more >
R Markdown issue i can`t really understand the error?
When knitting a document knitr always uses a fresh environment, so it can't find an in-built dataset that hasn't been loaded with data(poison....
Read more >
Render Rmarkdown documents using RStudio's background ...
Use the RStudio IDE's background jobs feature to render an Rmarkdown document, instead of the "knit" button.The knit button only allows you ...
Read more >
2.6 R code chunks and inline R code | R Markdown - Bookdown
Note that if you set error = FALSE , rmarkdown::render() will halt on error in a code chunk, and the error will be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found