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

TypeError: in typeassert error in _throw_if_error #169

Closed
MichaelHatherly opened this issue Sep 22, 2023 · 1 comment · Fixed by #179
Closed

TypeError: in typeassert error in _throw_if_error #169

MichaelHatherly opened this issue Sep 22, 2023 · 1 comment · Fixed by #179

Comments

@MichaelHatherly
Copy link
Collaborator

It would appear that the :stacktrace coming from Pluto isn't always a CapturedException. For the following notebook I'm getting the below error:

### A Pluto.jl notebook ###
# v0.19.26

using Markdown
using InteractiveUtils

# ╔═╡ fdee78e2-5932-11ee-2841-4b729906916f
'aa'

# ╔═╡ Cell order:
# ╠═fdee78e2-5932-11ee-2841-4b729906916f

julia> using PlutoStaticHTML

julia> PlutoStaticHTML.build_notebooks(BuildOptions("."))
[ Info: Starting evaluation of Pluto notebook "notebook.jl"
[ Info: Finished evaluation of Pluto notebook "notebook.jl" in 2 seconds
ERROR: TypeError: in typeassert, expected CapturedException, got a value of type Vector{Dict{Symbol, Any}}
Stacktrace:
 [1] _throw_if_error(session::Pluto.ServerSession, nb::Pluto.Notebook)
   @ PlutoStaticHTML ~/.julia/packages/PlutoStaticHTML/ax8jf/src/output.jl:179
 [2] _outcome2text(session::Pluto.ServerSession, nb::Pluto.Notebook, in_path::String, bopts::BuildOptions, oopts::OutputOptions)
   @ PlutoStaticHTML ~/.julia/packages/PlutoStaticHTML/ax8jf/src/build.jl:300
 [3] build_notebooks(bopts::BuildOptions, files::Vector{String}, oopts::OutputOptions; session::Pluto.ServerSession)
   @ PlutoStaticHTML ~/.julia/packages/PlutoStaticHTML/ax8jf/src/build.jl:484
 [4] build_notebooks
   @ ~/.julia/packages/PlutoStaticHTML/ax8jf/src/build.jl:468 [inlined]
 [5] build_notebooks
   @ ~/.julia/packages/PlutoStaticHTML/ax8jf/src/build.jl:504 [inlined]
 [6] build_notebooks(bopts::BuildOptions)
   @ PlutoStaticHTML ~/.julia/packages/PlutoStaticHTML/ax8jf/src/build.jl:499
 [7] top-level scope
   @ REPL[2]:1
(build) pkg> st
Status `~/plutostatic-tests/build/Project.toml`
⌅ [c3e4b0f8] Pluto v0.19.26
  [359b1769] PlutoStaticHTML v6.0.14
@rikhuijzer
Copy link
Owner

Sounds like a very annoying bug!

After this assertion the object goes into showerror which I suspect only works for CapturedException?

I will not have time to fix this in the coming weeks due to PhD deadlines. PRs are welcome and I’ll happily make time to review and get things merged

rikhuijzer added a commit that referenced this issue Feb 21, 2024
Fixes #169

Also updates Pluto to 0.19.39.
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

Successfully merging a pull request may close this issue.

2 participants