Pluto: a conflict with HTTP

Hi,

I have a series of Pluto notebooks that were working without any problems at all. I have already made a static HTML file of each one of them in the past.

I have just updated my Julia environment, and now I have a problem. Pluto fails to render a readable static Html file out of any notebook. The notebooks work in the browser apparently without any significant problem, but when I produce a static Html file, the output looks like a series of empty boxes.

The error that pops in as early as I open each notebook can be found below. I am on a Windows 10 machine, Julia 1.6.3, using Pluto v0.16.1, PlutoUI v0.7.1 and the packages used in one of the notebooks are the following:

begin
	using PlotlyBase
	using HypertextLiteral
	using PlutoUI
	using CSV
	using DataFrames
	using NLsolve
	using LinearAlgebra
	using TimeSeries
	using Dates
	using MonthlyDates
	using SparseArrays
	using StatsBase
end

I had HTTP v0.9.16 installed. I rm HTTP from my environment because the error starts with reference to HTTP. But the error keeps coming back, even after I tried to install HTTP v0.9.15, which failed due to conflicts with Pluto. Help will be very much appreciated.

The error:

β”Œ Error: Failed to resolve notebook boot environment
β”‚   exception =
β”‚    Unsatisfiable requirements detected for package HTTP [cd3eb016]:
β”‚     HTTP [cd3eb016] log:
β”‚     β”œβ”€possible versions are: 0.6.10-0.9.16 or uninstalled
β”‚     └─restricted to versions 0.9.15 by an explicit requirement β€” no versions left
β”‚    Stacktrace:
β”‚      [1] check_constraints(graph::Pkg.Resolve.Graph)
β”‚        @ Pkg.Resolve C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Resolve\graphtype.jl:978
β”‚      [2] Pkg.Resolve.Graph(versions::Dict{Base.UUID, Set{VersionNumber}}, deps::Dict{Base.UUID, Dict{VersionNumber, Dict{String, Base.UUID}}}, compat::Dict{Base.UUID, Dict{VersionNumber, Dict{String, Pkg.Types.VersionSpec}}}, uuid_to_name::Dict{Base.UUID, String}, reqs::Dict{Base.UUID, Pkg.Types.VersionSpec}, fixed::Dict{Base.UUID, Pkg.Resolve.Fixed}, verbose::Bool, julia_version::VersionNumber)
β”‚        @ Pkg.Resolve C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Resolve\graphtype.jl:371
β”‚      [3] deps_graph(ctx::Pkg.Types.Context, uuid_to_name::Dict{Base.UUID, String}, reqs::Dict{Base.UUID, Pkg.Types.VersionSpec}, fixed::Dict{Base.UUID, Pkg.Resolve.Fixed})
β”‚        @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:537
β”‚      [4] resolve_versions!(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec})
β”‚        @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:407
β”‚      [5] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, level::Pkg.Types.UpgradeLevel)
β”‚        @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1322
β”‚      [6] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, update_registry::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
β”‚        @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:261
β”‚      [7] #up#41
β”‚        @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:84 [inlined]
β”‚      [8] #resolve#113
β”‚        @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:267 [inlined]
β”‚      [9] resolve(ctx::Pkg.Types.Context)
β”‚        @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:267
β”‚     [10] top-level scope
β”‚        @ C:\Users\vmpm\.julia\packages\Pluto\ykSvj\src\runner\Loader.jl:23
β”‚     [11] include(fname::String)
β”‚        @ Base.MainInclude .\client.jl:444
β”‚     [12] top-level scope
β”‚        @ none:1
β”‚     [13] eval(m::Module, e::Any)
β”‚        @ Core .\boot.jl:360
β”‚     [14] (::Distributed.var"#103#104"{Distributed.CallMsg{:call}})()
β”‚        @ Distributed C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\process_messages.jl:274
β”‚     [15] run_work_thunk(thunk::Distributed.var"#103#104"{Distributed.CallMsg{:call}}, print_error::Bool)
β”‚        @ Distributed C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\process_messages.jl:63
β”‚     [16] run_work_thunk(rv::Distributed.RemoteValue, thunk::Function)
β”‚        @ Distributed C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Distributed\src\process_messages.jl:72
β”‚     [17] (::Distributed.var"#96#98"{Distributed.RemoteValue, Distributed.var"#103#104"{Distributed.CallMsg{:call}}})()
β”‚        @ Distributed .\task.jl:411
β”” @ Main C:\Users\vmpm\.julia\packages\Pluto\ykSvj\src\runner\Loader.jl:25

Hi,

Regarding my previous post, I checked on a different computer, and the same type of error also pops up.

However, despite the error, the static Html version of the notebooks is rendered in this new computer. Don’t know what is happening.

HTTP.jl 0.9.15 was revoked so that is probably related. I would report to Pluto devs. Do you have an entry in the notebook file with [compat] and HTTP.jl? Maybe something like HTTP = "=0.9.15"?

@fredrikekre, thank you for helping.

I have found three cases where HTTP is invoked in the notebook file:

[[WebSockets]]
deps = ["Base64", "Dates", "HTTP", "Logging", "Sockets"]
git-tree-sha1 = "f91a602e25fe6b89afc93cf02a4ae18ee9384ce3"
uuid = "104b5d7c-a370-577a-8038-80a2059c5097"
version = "1.5.9"
[[Mux]]
deps = ["AssetRegistry", "Base64", "HTTP", "Hiccup", "Pkg", "Sockets", "WebSockets"]
git-tree-sha1 = "82dfb2cead9895e10ee1b0ca37a01088456c4364"
uuid = "a975b10e-0019-58db-a62f-e48ff68538c9"
version = "0.7.6"

[[HTTP]]
deps = ["Base64", "Dates", "IniFile", "Logging", "MbedTLS", "NetworkOptions", "Sockets", "URIs"]
git-tree-sha1 = "44e3b40da000eab4ccb1aecdc4801c040026aeb5"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "0.9.13"

If I change the version of HTTP visible in the last entry (version =β€œ0.9.13”) to the one I have installed on my environment (HTTP v0.19.6), will it work?

You can try to update all packages in the notebook - there is a symbol next to the using commands to do this. That should re-trigger the Pkg dependency solving.

Thanks. I was aware of that. The problem is that HTTP.jl is actually not used in this particular notebook anymore. It was used before, but I changed its use to another notebook. But the notebook keeps the information about this package in its file.

I tried also the trick of inserting HTTP back into the set of used packages in this notebook and then did as you mention: update packages inside the notebook. Stuck with the same problem.

The funny part is that in two computers, I get two different outcomes with the same error: in one computer, the static HTML output gets corrupted, in the other, I get a clean output in the HTML file.

This came out yesterday when I updated the environments on both computers.

For what it’s worth, deleting the Pluto boot environments in ~/.julia/environments (named __pluto_boot_⟨version⟩) solved this problem for me.

5 Likes

@lmshk, thank you very much. That is a magic trick. It solved the problem on my laptop (the one that was still rendering the static Html file OK). As far as the other computer is concerned, I will have to wait until Monday. But I guess the problem has been solved.

Nevertheless, there seems to exist a conflict between HTTP and Pluto, because I tried to re-install Pluto, PlutoUI, and HTTP and there were a lot of problems.

Thank you very much. I say this as someone who doesn’t know what he is doing- I am trying to follow the MIT Intro to Computational Thinking course and I had Pluto working. Then, after an update to W11, the Pluto page wouldn’t load fully. I followed your recipe, and it worked although I have no idea why