# Repetitive, intrusive error in Juno: "MethodError: no method matching peekchar(::IOBuffer)"

**URL:** https://discourse.julialang.org/t/repetitive-intrusive-error-in-juno-methoderror-no-method-matching-peekchar-iobuffer/76718
**Category:** Juno
**Created:** [February 18, 2022, 6:31pm UTC](https://discourse.julialang.org/t/repetitive-intrusive-error-in-juno-methoderror-no-method-matching-peekchar-iobuffer/76718 "2022-02-18T18:31:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jameson\_Quinn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jameson_quinn/32/1490_2.png) [@Jameson\_Quinn](https://discourse.julialang.org/u/Jameson_Quinn)
#### Post date: [February 18, 2022, 6:31pm UTC](https://discourse.julialang.org/t/repetitive-intrusive-error-in-juno-methoderror-no-method-matching-peekchar-iobuffer/76718/1 "2022-02-18T18:31:34Z")

</div>

I’m using Juno in Atom, with atom 1.59.0 x64 on a mac M1 Pro. Julia-client is version 0.12.6, and julia itself is version 1.7.1.

I’m getting repetitive and intrusive errors, sometimes just when moving my mouse. These appear as “Julia Client — internal error” with text as below. These seem to be more frequent when my text and/or mouse cursor is in a line with string literals in it.

Here’s a full error log:

MethodError: no method matching peekchar(::IOBuffer)

Closest candidates are:

peekchar(!Matched::Tokenize.Lexers.Lexer) at ~/.julia/packages/Tokenize/8K64V/src/lexer.jl:138

peekchar(!Matched::CSTParser.ParseState) at ~/.julia/packages/CSTParser/uIeiO/src/lexer.jl:69

parse\_string\_or\_cmd(ps::CSTParser.ParseState, prefixed::Bool) at strings.jl:120

parse\_string\_or\_cmd at strings.jl:25 [inlined]

mLITERAL(ps::CSTParser.ParseState) at spec.jl:162

INSTANCE(ps::CSTParser.ParseState) at spec.jl:232

parse\_expression(ps::CSTParser.ParseState) at CSTParser.jl:57

macro expansion at internals.jl:157 [inlined]

macro expansion at utils.jl:58 [inlined]

parse\_comma\_sep(ps::CSTParser.ParseState, args::Vector{CSTParser.EXPR}, kw::Bool, block::Bool, istuple::Bool) at internals.jl:151

parse\_comma\_sep(ps::CSTParser.ParseState, args::Vector{CSTParser.EXPR}, kw::Bool) at internals.jl:150

macro expansion at utils.jl:197 [inlined]

parse\_call(ps::CSTParser.ParseState, ret::CSTParser.EXPR, ismacro::Bool) at internals.jl:138

parse\_call(ps::CSTParser.ParseState, ret::CSTParser.EXPR) at internals.jl:116

macro expansion at utils.jl:83 [inlined]

parse\_compound(ps::CSTParser.ParseState, ret::CSTParser.EXPR) at CSTParser.jl:107

parse\_compound\_recur(ps::CSTParser.ParseState, ret::CSTParser.EXPR) at CSTParser.jl:74

parse\_expression(ps::CSTParser.ParseState) at CSTParser.jl:69

parse\_block(ps::CSTParser.ParseState, ret::Vector{CSTParser.EXPR}, closers::Tuple{Tokenize.Tokens.Kind, Tokenize.Tokens.Kind, Tokenize.Tokens.Kind}, docable::Bool) at internals.jl:31

parse\_block at internals.jl:8 [inlined]

parse\_try(ps::CSTParser.ParseState) at keywords.jl:356

macro expansion at utils.jl:58 [inlined]

parse\_kw(ps::CSTParser.ParseState) at keywords.jl:13

parse\_expression(ps::CSTParser.ParseState) at CSTParser.jl:46

macro expansion at utils.jl:118 [inlined]

parse\_operator\_eq(ps::CSTParser.ParseState, ret::CSTParser.EXPR, op::CSTParser.EXPR) at operators.jl:225

parse\_operator(ps::CSTParser.ParseState, ret::CSTParser.EXPR, op::CSTParser.EXPR) at operators.jl:374

parse\_compound(ps::CSTParser.ParseState, ret::CSTParser.EXPR) at CSTParser.jl:125

parse\_compound\_recur(ps::CSTParser.ParseState, ret::CSTParser.EXPR) at CSTParser.jl:74

parse\_expression(ps::CSTParser.ParseState) at CSTParser.jl:69

parse\_doc(ps::CSTParser.ParseState) at CSTParser.jl:199

parse(ps::CSTParser.ParseState, cont::Bool) at CSTParser.jl:225

parse at CSTParser.jl:171 [inlined]

locals(text::String, line::Int64, col::Int64) at local.jl:46

localdatatip(word::String, column::Int64, row::Int64, startrow::Int64, context::String) at datatip.jl:40

datatip(word::String, mod::String, path::String, column::Int64, row::Int64, startrow::Int64, context::String) at datatip.jl:24

(::Atom.var"#329#330")(data::Dict{String, Any}) at datatip.jl:16

handlemsg(t::Dict{String, Any}, args::Dict{String, Any}) at comm.jl:169

invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) at essentials.jl:716

invokelatest(::Any, ::Any, ::Vararg{Any}) at essentials.jl:714

(::Atom.var"#31#33"{Vector{Any}})() at task.jl:423

---

<div class="post-metadata">

### Author: ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)
#### Post date: [February 18, 2022, 6:52pm UTC](https://discourse.julialang.org/t/repetitive-intrusive-error-in-juno-methoderror-no-method-matching-peekchar-iobuffer/76718/2 "2022-02-18T18:52:30Z")

</div>

Maybe [https://github.com/JuliaLang/Tokenize.jl/issues/196](https://github.com/JuliaLang/Tokenize.jl/issues/196).

Fixed by `CSTParser@3.3.1` ?

---

<div class="post-metadata">

### Author: ![rsarfati](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rsarfati/32/9964_2.png) [@rsarfati](https://discourse.julialang.org/u/rsarfati)
#### Post date: [June 21, 2022, 7:50pm UTC](https://discourse.julialang.org/t/repetitive-intrusive-error-in-juno-methoderror-no-method-matching-peekchar-iobuffer/76718/3 "2022-06-21T19:50:43Z")

</div>

Had same problem, the following worked for me:

```julia
] add Tokenize # if not already in your project
] pin Tokenize@0.5.21

```

Discussion of issue is here: [peekchar error in Atom · Issue #327 · julia-vscode/CSTParser.jl · GitHub](https://github.com/julia-vscode/CSTParser.jl/issues/327)
