mvellandi

mvellandi

Exploring Graphs with Elixir: Missing directories (p 100, 105)

Exploring Graphs with Elixir by @tonyhammond

p.100 – Ch 3 > Storing Graphs in the Graph Store > Listing
shows

“iex>​​ ​​list_graphs​
​ 	[..., "default.dot", "IMAGES", ...]”

but (to my recollection) we have not defined this directory yet, either manually or automatically through the shell command in:
p.68 – Ch 2 > Building a Graph Store > Creating a Storage area

I see a reference to this “images” directory later, as a module attribute in NativeGraph.Format
So I manually created it.

Then in
p.105 – Ch 3 > Visualizing Graphs > Rendering with Graph Viz
while creating the water molecule graph, we’re given:

“iex>​​ ​​with​​ ​​{:ok,​​ ​​dot}​​ ​​=​​ ​​Graph.to_dot(g)​​ ​​do​
​ 	​...>​​ ​​write_graph(dot,​​ ​​"dot/h2o.dot"​​)​
​ 	​...>​​ ​​end”

When trying this, I get a File error since the “dot” directory is unavailable. Not sure what I’m missing here, or if the directory is supposed to be automatically created?
I manually created a “dot” directory to make the code work as shown and tested in later pages.

Marked As Solved

tonyhammond

tonyhammond

Author of Exploring Graphs with Elixir

Yes, this was not very clear. These directories are to be added manually.

I added this text on p. 29 in Chapter 2, Building a Graph Store, section Listing:

“And we’ll also want to be able to access graphs and queries within any directories that we may add manually to our store.”

And on p. 47 in Chapter 3. Managing Graphs Natively with Elixir:

“In this case we have manually added an images/ directory.”

And on p. 49:
“And for better graph management note that we’ve manually added the dot/ and images/ directories in our graph store:”

Also I hadn’t been consistent in writing dot files to the dot/ directory. Fixed that too.

Where Next?

Popular Pragmatic Bookshelf topics Top

jimmykiang
This test is broken right out of the box… — FAIL: TestAgent (7.82s) agent_test.go:77: Error Trace: agent_test.go:77 agent_test.go:...
New
jimschubert
In Chapter 3, the source for index introduces Config on page 31, followed by more code including tests; Config isn’t introduced until pag...
New
johnp
Running the examples in chapter 5 c under pytest 5.4.1 causes an AttributeError: ‘module’ object has no attribute ‘config’. In particula...
New
AleksandrKudashkin
On the page xv there is an instruction to run bin/setup from the main folder. I downloaded the source code today (12/03/21) and can’t see...
New
cro
I am working on the “Your Turn” for chapter one and building out the restart button talked about on page 27. It recommends looking into ...
New
rmurray10127
Title: Intuitive Python: docker run… denied error (page 2) Attempted to run the docker command in both CLI and Powershell PS C:\Users\r...
New
gilesdotcodes
In case this helps anyone, I’ve had issues setting up the rails source code. Here were the solutions: In Gemfile, change gem 'rails' t...
New
Chrichton
Dear Sophie. I tried to do the “Authorization” exercise and have two questions: When trying to plug in an email-service, I found the ...
New
brunogirin
When running tox for the first time, I got the following error: ERROR: InterpreterNotFound: python3.10 I realised that I was running ...
New
gorkaio
root_layout: {PentoWeb.LayoutView, :root}, This results in the following following error: no “root” html template defined for PentoWeb...
New

Other popular topics Top

AstonJ
Or looking forward to? :nerd_face:
New
Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
AstonJ
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
AstonJ
This looks like a stunning keycap set :orange_heart: A LEGENDARY KEYBOARD LIVES ON When you bought an Apple Macintosh computer in the e...
New
PragmaticBookshelf
“Finding the Boundaries” Hero’s Journey with Noel Rappin @noelrappin Even when you’re ultimately right about what the future ho...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
AstonJ
Seems like a lot of people caught it - just wondered whether any of you did? As far as I know I didn’t, but it wouldn’t surprise me if I...
New
Maartz
Hi folks, I don’t know if I saw this here but, here’s a new programming language, called Roc Reminds me a bit of Elm and thus Haskell. ...
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
PragmaticBookshelf
Author Spotlight: Peter Ullrich @PJUllrich Data is at the core of every business, but it is useless if nobody can access and analyze ...
New

Sub Categories: