aviatesk / aviatesk/juliacon2021-workshop-pkgdev
Unable to run JET.jl tutorial notebooks - `MethodError: no method matching iterate(::Nothing)`
- Dominant language
- Jupyter Notebook
- Stars
- 33
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Hi, thanks for the very nice workshop (still only 30 minutes in though!)
I get an error when I try to run the third cell of the [jet.ipynb](https://github.com/aviatesk/juliacon2021-workshop-pkgdev/blob/master/JET.ipynb).
The cell is
```
@report_toplevel begin
fib(n) = n ≤ 2 ? n : fib(n-1) + fib(n-2)
fib(1000)
fib(1000.0)
fib(BigInt(1000))
fib("1000") # error !
end
```
The error I get is
```
MethodError: no method matching iterate(::Nothing)
Closest candidates are:
iterate(::Union{LinRange, StepRangeLen}) at C:\Users\arpit\AppData\Local\Programs\Julia-1.7.0\share\julia\base\range.jl:826
iterate(::Union{LinRange, StepRangeLen}, ::Integer) at C:\Users\arpit\AppData\Local\Programs\Julia-1.7.0\share\julia\base\range.jl:826
iterate(::T) where T<:Union{Base.KeySet{<:Any, <:Dict}, Base.ValueIterator{<:Dict}} at C:\Users\arpit\AppData\Local\Programs\Julia-1.7.0\share\julia\base\dict.jl:695
...
Stacktrace:
[1] indexed_iterate(I::Nothing, i::Int64)
@ Base .\tuple.jl:92
[2] abstract_call_method_with_const_args(analyzer::JET.JETAnalyzer{JET.BasicPass}, result::Core.Compiler.MethodCallResult, f::Any, argtypes::Vector{Any}, match::Core.MethodMatch, sv::Core.Compiler.InferenceState, va_override::Bool)
@ JET C:\Users\arpit\.julia\packages\JET\jK0v3\src\abstractinterpretation.jl:187
[3] abstract_call_gf_by_type(interp::JET.JETAnalyzer{JET.BasicPass}, f::Any, fargs::Vector{Any}, argtypes::Vector{Any}, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler .\compiler\abstractinterpretation.jl:113
[4] abstract_call_gf_by_type
@ C:\Users\arpit\.julia\packages\JET\jK0v3\src\abstractinterpretation.jl:64 [inlined]
[5] abstract_call_known(interp::JET.JETAnalyzer{JET.BasicPass}, f::Any, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler .\compiler\abstractinterpretation.jl:1342
```
Here's my output of `versioninfo()`
```
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: AMD Ryzen 7 1700 Eight-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, znver1)
```
Here's my JET version - `[c3a54625] JET v0.5.2`
I use WSL, but got the same error on native Windows.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the third cell of jet.ipynb and reproduce it using Julia 1.7.0 and JET v0.5.2, including the fib("1000") call. Compare the behavior in WSL and native Windows if needed; done means the tutorial cell runs without MethodError: no method matching iterate(::Nothing).
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100