Hi Everyone, I'm trying to create a Clerk notebook in a Polylith development workspace. One of my dependencies is a component in Polylith (a namespace in another folder). When I use this library I am unable to render the clerk notebook. Here is my "require" statement (polyNO.waterfall.interface is the library in question):
(ns analysis.clj
(:require [nextjournal.clerk :as clerk]
[tablecloth.api :as tc]
[polyNO.waterfall.interface :as wtf])
(:import (javax.imageio ImageIO)
(java.awt.image BufferedImage)
( URL)))
When I call a function from the polyNO.waterfall.interface like this:
(wtf/createWaterfall data)
The function produces the desired output in the REPL, but gives an error in the Clerk notebook. Here is the error:
Unhandled java.nio.file.NoSuchFileException
C:\Users\SLastName\Company%20Name%20Dropbox\Stuart%20Lastname\Head%20Folder\Network%20Project\polyNO\components\waterfall\src\polyNO\waterfall\interface.clj
I suspect this is because the spaces in the file path have been replaced by "%20", but I'm not sure how to go about fixing this, short of changing the folder names in my file path, which would break many other of my processes in other projects.
Is this something anyone else has encountered before, or have advice on what I should look for?Thanks @jackrusher! I've submitted the issue (https://github.com/nextjournal/clerk/issues/565)
This is probably a Windows-specific bug with file paths that we havenāt encountered because none of us use Windows. It should be easily fixable once weāre able to track it down. Do you have a longer stack trace?
@jackrusher Here is the entirety of the error message in the Clerk notebook:
Unhandled clojure.lang.ExceptionInfo
`nextjournal.clerk/show!` encountered an eval error with: `"c:\\Users\\SLastname\\Company Name Dropbox\\Stuart Lastname\\Project Name\\Network Project\\polyNO\\development\\src\\tlvcAnalysis.clj"`
{:nextjournal.clerk/doc {:blob->result {
"5drWFmyfpcQwrDhcLdQR886KUiBWi6"
{:nextjournal.clerk/visibility {:code :hide}}
"5drxFpVPxNxH2YaATNi6Q2ajtxCiWA"
{:nextjournal.clerk/var-from-def (var tlvcAnalysis.clj/waterfall-references)}
"5duC57YjC4wNApZipytwD5dGYk9XWi"
{:nextjournal.clerk/var-from-def (var tlvcAnalysis.clj/waterfall-data)}
"8VxMLktXDdtVMc8iXimmtZ8NSKSLuY18iS4X8ByUYe38wJcyDLyPHV17oQkSvYDuZuMZzBdwAVhWgxup10 moreā¦"
nil} :blocks [{:loc {:column 1 :end-column 46 :end-line 1 :line 1} :text
"{:nextjournal.clerk/visibility {:code :hide}}"
:type :code} {:loc {:column 1 :end-column 28 :end-line 15 :line 2} :text "
(ns tlvcAnalysis.cljā©ļø (:require [nextjournal.clerk :as clerk]ā©ļø [tech482 moreā¦"
:type :code} {:doc {:content [{:attrs {:id
"summary"}
:content [{:text
"
Summary"
:type :text}] :heading-level 2 :type :heading} {:content [{:text
"
This page summarizes a scenario and lists the top opportunities."
:type :text}] :type :paragraph} {:content [{:text
"
Each opportunity consists of the following:"
:type :text}] :type :paragraph} {:content [{:content [{:content [{:text
"
The opportunity aggregation (by product and customer / product line / other)."
:type :text}] :type :plain}] :type :list-item} {:content [{:content [{:text
"
A geographic map showing the product flows."
:type :text}] :type :plain}] :type :list-item} {:content [{:content [{:text
"
A waterfall showing the savings by category."
:type :text}] :type :plain}] :type :list-item} {2 moreā¦}] :type :bullet-list} {4 moreā¦} {2 moreā¦} {2 moreā¦} {4 moreā¦} {2 moreā¦}] :footnotes [] :type :doc} :type :markdown} {3 moreā¦} {3 moreā¦} {3 moreā¦} {3 moreā¦} {2 moreā¦}] :file
"
c:\Users\SLastname\Company Name Dropbox\Stuart Lastname\Project Name\Network Project\42 moreā¦"
:footnotes [] :nav-path
"
/c:/Users/SLastname/Company Name Dropbox/Stuart Lastname/Project Name/Network Optimization39 moreā¦"
:title
"
Summary"
:toc {2 moreā¦}}}
Unhandled java.nio.file.NoSuchFileException
C:\Users\SLastname\Company%20SCA%20Dropbox\Stuart%20Lastname\Project%20Name\Network%20Project\polyNO\components\waterfall\src\polyNO\waterfall\interface.cljI can confirm this is indeed a windows error. I created the same notebook from a WSL and the notebook renders as expected.
Weāve got an internal crunch for a consulting project this week. Would you be so kind as to create an issue with the above at https://github.com/nextjournal/clerk ? We should be able to take care of this next week or so. š