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

cannot produce result #3

Open
RoyCCWang opened this issue Oct 1, 2022 · 1 comment
Open

cannot produce result #3

RoyCCWang opened this issue Oct 1, 2022 · 1 comment

Comments

@RoyCCWang
Copy link

Thanks for making this package. Please assist me with a minimal example.

My versioninfo():

Julia Version 1.8.1
Commit afb6c60d69a (2022-09-06 15:09 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 32 × AMD Ryzen Threadripper 1950X 16-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, znver1)
  Threads: 1 on 32 virtual cores

I have a notebook file s2.jl with content:

### A Pluto.jl notebook ###
# v0.19.9

using Markdown
using InteractiveUtils

# ╔═╡ dd19e674-41dc-11ed-2632-45d65300f4b7
c = 23

# ╔═╡ 2c98b39e-cb1f-4d42-9712-b17871cda345
b =2

# ╔═╡ 9ce351f4-a128-4a12-861d-dba6e0475324
a=sqrt(b^2+c^2)

# ╔═╡ 00000000-0000-0000-0000-000000000001
PLUTO_PROJECT_TOML_CONTENTS = """
[deps]
"""

# ╔═╡ 00000000-0000-0000-0000-000000000002
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised

julia_version = "1.8.1"
manifest_format = "2.0"
project_hash = "da39a3ee5e6b4b0d3255bfef95601890afd80709"

[deps]
"""

# ╔═╡ Cell order:
# ╠═dd19e674-41dc-11ed-2632-45d65300f4b7
# ╠═2c98b39e-cb1f-4d42-9712-b17871cda345
# ╠═9ce351f4-a128-4a12-861d-dba6e0475324
# ╟─00000000-0000-0000-0000-000000000001
# ╟─00000000-0000-0000-0000-000000000002

I did Pluto.run() in a separate REPL, and started a new REPL for PlutoRESTClient. The notebook file s.jl is in the working directory of the REPL. I got the following in the new REPL:

julia> using PlutoRESTClient

julia> nb = PlutoNotebook("s.jl")
PlutoNotebook("http://localhost:1234", "s.jl")

julia> nb.c
ERROR: 
Stacktrace:
 [1] getproperty(with_args::PlutoRESTClient.PlutoNotebookWithArgs, symbol::Symbol)
   @ PlutoRESTClient ~/.julia/packages/PlutoRESTClient/solHB/src/PlutoRESTClient.jl:185
 [2] getproperty(notebook::PlutoNotebook, symbol::Symbol)
   @ PlutoRESTClient ~/.julia/packages/PlutoRESTClient/solHB/src/PlutoRESTClient.jl:113
 [3] top-level scope
   @ REPL[4]:1

caused by: 
Stacktrace:
 [1] evaluate(output::Symbol, filename::String, host::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ PlutoRESTClient ~/.julia/packages/PlutoRESTClient/solHB/src/PlutoRESTClient.jl:40
 [2] evaluate(output::Symbol, filename::String, host::String)
   @ PlutoRESTClient ~/.julia/packages/PlutoRESTClient/solHB/src/PlutoRESTClient.jl:24
 [3] getproperty(with_args::PlutoRESTClient.PlutoNotebookWithArgs, symbol::Symbol)
   @ PlutoRESTClient ~/.julia/packages/PlutoRESTClient/solHB/src/PlutoRESTClient.jl:180
 [4] getproperty(notebook::PlutoNotebook, symbol::Symbol)
   @ PlutoRESTClient ~/.julia/packages/PlutoRESTClient/solHB/src/PlutoRESTClient.jl:113
 [5] top-level scope
   @ REPL[4]:1

Do you know if Pluto notebook publishes its API specifications? Did you figure it out from the source code? If I know the API specs, I can try to directly use HTTP packages to interact with Pluto notebooks or contribute to this package.

@GuanglinDu
Copy link

This package cannot work anymore with Pluto v0.19.9. Direct access to the Pluto Notebook webpage does pose a serious security threat.

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