티스토리 뷰
rocker/tidyverse:4.1.0 로 R 프로그램을 개발중인데, 한글로 주석을 작성해서 저장할때마다 오류메시지가 나온다. 아래의 경우는 "제외해야할 대상파악" 이라는 한글 주석때문에 나오는 에러이다.

정확한 메시지는 아래와 같고, 스펠링체크를 실시간으로 하는거 같은데 구글링을 해봤더니 답이 나왔다.
| 25 Jul 2021 03:42:41 [rsession-rstudio] ERROR system error 84 (Invalid or incomplete multibyte or wide character) [str: 제외해야할, len: 15, from: UTF-8, to: ISO8859-1]; OCCURRED AT rstudio::core::Error rstudio::r::util::{anonymous}::iconvstrImpl(const string&, const string&, const string&, bool, std::__cxx11::string*) src/cpp/r/RUtil.cpp:187; LOGGED FROM: rstudio::core::Error rstudio::session::modules::spelling::{anonymous}::checkSpelling(const rstudio::core::json::JsonRpcRequest&, rstudio::core::json::JsonRpcResponse*) src/cpp/session/modules/SessionSpelling.cpp:225 |
R4.1.0 and [rsession-rstudio] System ERROR 13 & 84 (Invalid or incomplete multibyte or wide character)
After upgrading to R 4.1.0 and RStudio 1.4.1717 from R 4.0.5 & Rstudio 1.4.1106 (custom docker container, based on rocker/tidyverse), I started seeing these messages printed in Red, to Rstudio console. 16 Jun 2021 01:16:27 [rsession-rstudio] ERROR system e
community.rstudio.com
결론은 rstudio-prefs.json 파일에 realtime spellchecking 옵션을 설정을 추가하면 된다.
"real_time_spellchecking": false
rocker/tidyverse:4.1.0 도커이미지에서 해당 rstudio-prefs.json 파일이 어딨는지 확인해보니, /home/rstudio/.config/rstudio 위치에 있다.

기존 설정은 아래와 같고,

해당 파일을 로컬pc에서 저장하고 real_time_spellchecking 옵션을 추가해서 만들어 놓는다.
{
"save_workspace": "never",
"always_save_history": false,
"reuse_sessions_for_project_links": true,
"real_time_spellchecking": false
}
로컬 환경에 rstudio 하시는분은 상관이 없는데, docker 로 개발환경이 되어 있다보니 docker image 를 다시 빌드 해야한다. 해당 rstudio-prefs.json 은 root 계정이 아니라, rstudio server 에 접속되는 계정인 rstudio 사용자로 권한설정이 되어 있어야 해서 chown 옵션을 추가한다.
FROM rocker/tidyverse:4.1.0
COPY scripts /rocker_scripts
RUN /rocker_scripts/install_mypackages.sh
COPY --chown=rstudio:rstudio scripts/rstudio-prefs.json \
/home/rstudio/.config/rstudio/rstudio-prefs.json
빌드해서 docker exec 로 확인해보면, 제대로 복사가 잘되었다.

rstudio 에 접속해서 확인해보면 더이상 빨간 에러 메시지는 나오지 않는다.

- Total
- Today
- Yesterday
- 맥북
- MongoDB
- 마인크래프트
- ggplot
- MyBatis
- eclipse
- javascript
- heroku
- 알뜰요금제
- 자급제폰
- 셀프개통
- ipTIME
- 이클립스
- docker
- Spring
- ktm모바일
- Google Chart Tools
- java
- github
- 막대그래프
- ggplot2
- Oracle
- ubuntu
- vagrant
- SVN
- python
- R
- 아이맥
- 도넛차트
- MySQL
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |