I have been working on a project and I have been using JSON to build some networks, the code I use is:
Remove["Global`*"]
SetDirectory@NotebookDirectory[];
data = Import["DATASET.json", "JSON", Path -> NotebookDirectory[]];
data = Normal[data];
Suddenly it started to show an error that I haven't been able to fix:
Get::noopen: Cannot open JSONTools`. >>
Import::fmterr: Cannot import data as JSON format. >>
I have tried:
- Closing and opening Mathematica
- Making a clean start
- Executing the following line trying to reset whatever is wrong:
titanic = ExampleData[{"Dataset", "Titanic"}]
- Restarting the PC
I am using a MAC OS 10.7.5 Mathematica Version 10.0.1.0
Thanks in advance
Guys thanks both for the help, after trying all your suggestions I have fixed it but still I wanted to answer all the questions for everyone to know:
Have you ensured that no notebooks or palettes are open, other than the notebook you are working with? A/ Yes indeed, the nb I was working with was the only one open and no palettes were open.
Did you try to evaluate this in a new and clean notebook (not an old one you saved)? A/ Yes I did try this, but the error persisted.
What does FindFile["JSONTools`"]
return?
A/ "/Applications/Mathematica.app/SystemFiles/Links/JSONTools/Kernel/init.m"
Finally, just in case, try turning off the Suggestion Bar (go to Preferences, Interface tab, look at the bottom), restart Mathematica again and try again. A/ I did try this and restarted Mathematica and still not working.
Get[FindFile["JSONTools`"]]
This totally worked for the current session... When I restart Mathematica and try to import the JSON file it doesn't work. I have (As ZachB suggested) to use Get FindFile again everytime in order to make it work, I will attach to this solution by now.
Thanks for the help!
FindFile["JSONTools`"]
return? Finally, just in case, try turning off the Suggestion Bar (go to Preferences, Interface tab, look at the bottom), restart Mathematica again and try again. Let us know if it works now and which step fixed it. $\endgroup$