2
$\begingroup$

I am working with a list of countries that I then want to utilize Interpreter on for some later functionality. For some reason, "South Africa" returns as a single item list within the list while all the other countries do not.

countries = {"eSwatini", "South Africa", "United States", "Canada", 
   "South Sudan"};
Interpreter["Country"][# & /@ countries]

enter image description here

I then tried to expand the dataset by looking at a list of all countries:

webcountries = 
  Import["https://www.dfa.ie/travel/travel-advice/a-z-list-of-\
countries/", "Data"];
countrylist = webcountries[[4]];
Interpreter["Country"][# & /@ countrylist]

There were a few in the list that Interpreter failed to work with, but interestingly, only South Africa returns as a single item list within the list.

I can't think of any other reason this would happen besides a bug.

Thoughts?

$\endgroup$
  • $\begingroup$ With version 11.3 on my Mac, your code produces a single-item list for all five entries. $\endgroup$ – Bob Hanlon Jul 9 '18 at 18:32
  • $\begingroup$ Fascinating. I am also running 11.3, but on Windows 10. I exited out of everything and started fresh, but still got the same result shown in the image above. I tried running it with the Wolfram online options (Mathematica Online, Programming Lab, Development Platform) and they all returned as a list with no countries being single-item lists. Seems odd to have three different results from the same code. $\endgroup$ – kickert Jul 9 '18 at 18:40
  • $\begingroup$ when I execute your code on wolfram cloud through a mobile app, which I believe is running 11.3, I get a list of single items, as @BobHanlon reported. $\endgroup$ – MarcoB Jul 9 '18 at 19:06
  • $\begingroup$ I think Bob was saying he is getting a list of single item lists, whereas the wolfram cloud returns a straight list of Entities. Is anyone able to duplicate my results on a similar setup (11.3 on Windows 10). $\endgroup$ – kickert Jul 9 '18 at 19:11
  • 1
    $\begingroup$ I cannot reproduce output with 11.3 on Win 10; I get a single-item list. Note that you do not need to map that function over the list Interpreter["Country"][countries] will do just fine. $\endgroup$ – Edmund Jul 9 '18 at 21:10
1
$\begingroup$

I ended up contacting Wolfram Technical Support on this issue. Their recommendation was that reset Mathematica to its default configuration. I did that as outlined in this site: http://support.wolfram.com/kb/12464

All seems to work as expected at this point.

No idea why such a specific error would occur, but at least I have a fix for it.

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ More likely than not, the value was cached and incorrect somehow. You effectively deleted the cached values when you removed those directories. $\endgroup$ – Searke Jul 13 '18 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.