knitr makes RStudio go into a tailspin...

RStudio Version 1.2.1335
Build 1351 (f1ac3452)

platform x86_64-apple-darwin15.6.0
arch x86_64
os darwin15.6.0
system x86_64, darwin15.6.0
major 3
minor 6.1
year 2019
month 07
day 05
svn rev 76782
language R
version.string R version 3.6.1 (2019-07-05)
nickname Action of the Toes

When I run the following cell (first in file) then RStudio starts generating a stream of error messages:

knitr::opts_chunk$set(echo = TRUE)

The error messages (which keep repeating) say:
Error: option error has NULL value

Error: option error has NULL value

This is what I get when I run 'lldb -w -n rsession' and then start RStudio:

Need:~ michael$ lldb -w -n rsession
(lldb) process attach --name "rsession" --waitfor
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 52, in
import weakref
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 14, in
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
Process 8421 stopped

  • thread #1, queue = '', stop reason = signal SIGSTOP
    frame #0: 0x00007fff7c34b86a libsystem_kernel.dylib__psynch_cvwait + 10 libsystem_kernel.dylib__psynch_cvwait:
    -> 0x7fff7c34b86a <+10>: jae 0x7fff7c34b874 ; <+20>
    0x7fff7c34b86c <+12>: movq %rax, %rdi
    0x7fff7c34b86f <+15>: jmp 0x7fff7c348457 ; cerror_nocancel
    0x7fff7c34b874 <+20>: retq
    Target 0: (rsession) stopped.

Executable module set to "/Applications/".
Architecture set to: x86_64h-apple-macosx-.

There was an issue earlier this year across multiple operating systems that sounds like what you are seeing that was eventually fixed in the preview version (for Mac OS starting in version 1.2.1522 or so). You can see the issue on the conversation on GitHub here (I linked to a point starting at the MacOS-specific part of the conversation).

Given that, you might try the preview version of RStudio to see if it fixes things for you:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.