1

I am trying to get this example working;

http://bl.ocks.org/mbostock/raw/2966094/46279db71d3c218664f72e1d3cb74cb2fb46da43/

The example online works perfectly. But when I copy the example to my local MAMP installation, I get the following error:

Uncaught TypeError: Object [object Array] has no method 'nodes'.

My json is loading correctly, does anyone know where this problem is coming from?

1 Answer 1

1

I just did the following:

git clone https://gist.github.com/2966094.git pedigree_tree
cd pedigree_tree
python -m SimpleHTTPServer

... and then opened my browser to:

http://localhost:8000/

The example works without any problems, which is to be expected.

Perhaps you could try replicating my steps (you should have Python on your Mac). If it works via the python SimpleHTTPServer, the assumption would be that something is awry with your MAMP configuration.

Alternatively, perhaps something went wrong with your download / clone of the example. Do you see any errors in your browser developer console (in Chrome: Menu | Tools | Developer Tools)?

Sign up to request clarification or add additional context in comments.

2 Comments

Really stupid mistake on my behalf, I had a template rendering plugin om my MAMP installation which parsed the javascript arrays a values.
I'm glad you could fix it, and thanks for selecting my attempt as the answer! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.