ChifiSource / Olive.jl

pure julia notebooks
MIT License
152 stars 6 forks source link

Basic setup doesn't work #54

Closed VarLad closed 1 year ago

VarLad commented 1 year ago

Clicking on "confirm" in the folders does nothing Prints the following into the terminal:

julia> ┌ Error: handle_connection handler error
│   exception =
│    KeyError: key "" not found
│    Stacktrace:
│     [1] getindex
│       @ ./dict.jl:484 [inlined]
│     [2] document_linker(c::Toolips.Connection)
│       @ ToolipsSession ~/.julia/packages/ToolipsSession/xaxsW/src/ToolipsSession.jl:88
│     [3] (::Toolips.var"#serve#63"{Vector{Toolips.AbstractRoute}, String, Vector{Toolips.ServerExtension}, Vector{Toolips.ServerExtension}})(http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Connection{Sockets.TCPSocket}})
│       @ Toolips ~/.julia/packages/Toolips/L3oiV/src/server/Core.jl:1417
│     [4] #invokelatest#2
│       @ ./essentials.jl:816 [inlined]
│     [5] invokelatest
│       @ ./essentials.jl:813 [inlined]
│     [6] handle_connection(f::Function, c::HTTP.ConnectionPool.Connection{Sockets.TCPSocket}, listener::HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, readtimeout::Int64, access_log::Nothing)
│       @ HTTP.Servers ~/.julia/packages/HTTP/z8l0i/src/Servers.jl:447
│     [7] macro expansion
│       @ ~/.julia/packages/HTTP/z8l0i/src/Servers.jl:385 [inlined]
│     [8] (::HTTP.Servers.var"#16#17"{Toolips.var"#serve#63"{Vector{Toolips.AbstractRoute}, String, Vector{Toolips.ServerExtension}, Vector{Toolips.ServerExtension}}, HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, Set{HTTP.ConnectionPool.Connection}, Int64, Nothing, Base.Semaphore, HTTP.ConnectionPool.Connection{Sockets.TCPSocket}})()
│       @ HTTP.Servers ./task.jl:514
└ @ HTTP.Servers ~/.julia/packages/HTTP/z8l0i/src/Servers.jl:461

This is on Linux, on Olive 0.0.8 (main) on julia 1.9rc-1

emmaccode commented 1 year ago

Can I get your browser, as well (to attempt to replicate this, I typically develop in chrome.) Have you tried turning it off and back on again lol

emmaccode commented 1 year ago

caused by #57 ... going to go ahead and leave this open for anyone that might face the same issue. Some special symbols in your directory are causing the document to sort of fall apart and become no longer parsable. The solution is to find a different place to put your home directory until #57 is closed. First, remove your current Olive version:

pkg> rm Olive

Next, add Olive Unstable -- which has an added key-word argument to the function start that will allow you to set the starting home directory to another directory. For example, (this is post registration, otherwise replace Olive with this repository's URL.

pkg> add Olive#Unstable

julia> using Olive

julia> using Olive; Olive.start(home = pwd())

I hope to get the actual IO issue that is the source of this fixed very soon... Hoping to make it the focus for tommorrow!

VarLad commented 1 year ago

Another solution (for those who want to use the published version or the stable version), might be to launch Julia with HOME="/path/to/an/empty/folder" JULIA_DEPOT_PATH="/path/to/.julia/folder julia

TheCedarPrince commented 1 year ago

Hey @emmettgb, I am also running into this issue that @VarLad described. Just tried starting a notebook and it doesn't work. Not only do I have the issue that Var described, but I also get an error in precompiling the olive module being activated. It gave me a dependency error (I am on the latest #Unstable branch right now) about Olive not being a dependency. To get around this, what I did was:

  1. Navigate into the olive directory and manually added Olive.jl
  2. Restarted my Julia session
  3. Restarted olive environment
  4. Success

Also I can't seem to create files at the moment. I get an error such as open("/home/jacob@me.computer/OliveTest/olive", 65, 438): illegal operation on a directory. To get around that I dropped out of Julia for a moment, touched a file called test.jl, restarted Olive, and then I could pull up the editor.

Cool stuff!

emmaccode commented 1 year ago

Hey @emmettgb, I am also running into this issue that @VarLad described. Just tried starting a notebook and it doesn't work. Not only do I have the issue that Var described, but I also get an error in precompiling the olive module being activated. It gave me a dependency error (I am on the latest #Unstable branch right now) about Olive not being a dependency. To get around this, what I did was:

  1. Navigate into the olive directory and manually added Olive.jl
  2. Restarted my Julia session
  3. Restarted olive environment
  4. Success

Also I can't seem to create files at the moment. I get an error such as open("/home/jacob@me.computer/OliveTest/olive", 65, 438): illegal operation on a directory. To get around that I dropped out of Julia for a moment, touched a file called test.jl, restarted Olive, and then I could pull up the editor.

Cool stuff!

Definitely a permissions issue with the directory you chose, as far as I can tell. Seems Julia cannot create or save files.

Hmmm that's interesting, I didn't think we would need to add Olive in order to have it work as a dependency for those sub-files, given that they are sourced below Olive from Olive. Odd that this remains a little inconsistent, but also understandable.

I suppose the solution to that would just be adding Olive in setup

emmaccode commented 1 year ago

So this issue is effectively resolved, as it was an issue with dependencies -- this issue should not exist going forward so long as one is using ToolipsSession 0.3.3+.... This was caused by #57 Thank you to @VarLad for helping me diagnose the issue by introspecting a few things on their machine. Closing now.