Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined reference when using clear_output #1066

Open
MilesCranmer opened this issue Feb 8, 2023 · 1 comment
Open

Undefined reference when using clear_output #1066

MilesCranmer opened this issue Feb 8, 2023 · 1 comment

Comments

@MilesCranmer
Copy link
Member

Hey,

Not sure what this error is, but running clear_output inside a Jupyter notebook seems to result in an undefined reference error. MWE below.

  1. The output of versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.5.0)
  CPU: 8 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 6 on 6 virtual cores
  1. How you installed Julia

juliaup

  1. A minimal working example (MWE), also known as a minimum reproducible example

In a Jupyter notebook:

import IJulia: display, clear_output

display("text/html", "<h1>Test</h1>")
clear_output()
display("text/html", "<h1>Test</h1>")

produces the error:

UndefRefError: access to undefined reference

Stacktrace:
 [1] getproperty
   @ ./Base.jl:38 [inlined]
 [2] getindex
   @ ./refvalue.jl:56 [inlined]
 [3] clear_output(wait::Bool)
   @ IJulia ~/.julia/packages/IJulia/6TIq1/src/IJulia.jl:288
 [4] top-level scope
   @ ~/Documents/PySR/examples/test_progress_bars.ipynb:2

Confirmed this also happens with no output, and with wait set to true or false.


I am using the official Jupyter extension inside VSCode. This is version v2023.1.2010391206.

@rtdietrich
Copy link

rtdietrich commented Apr 17, 2023

I have the same problem and hope it will be fixed soon

VSCode

OS: Windows (x86_64-w64-mingw32)
CPU: 32 × AMD Ryzen 9 7950X 16-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, znver3)
Threads: 32 on 32 virtual cores
Environment:
JULIA_EDITOR = code.cmd -g

Try to run this:

using Rocket, Compose, IJulia ; set_default_graphic_size(35cm, 2cm)

function draw_ball(t)
    IJulia.clear_output(true)
    x = -exp(-0.01t) + 1                     # x coordinate
    y = -abs(exp(-0.04t)*(cos(0.1t))) + 0.83 # y coordinate
    display(compose(context(), circle(x, y, 0.01)))
end

source = interval(20) |> take(200) # Take only first 200 emissions

subscription = subscribe!(source, draw_ball)```

sleep(5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants