Message Boards Message Boards

0
|
6628 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

EntityValue[...] error?

Posted 8 years ago

I am trying to obtain information about an entity with EntityValue[]. However, I keep getting an error message. I get the same error message when I run the examples for EntityValue[] in the documentation. Here are the particulars:

My code:

myCity = EntityValue[First[RandomSample[CityData[{Large, "Washington", "UnitedStates"}], 1]], "Name"]

Simpler test:

EntityValue[Entity["City", {"Everett", "Washington", "UnitedStates"}], "Name"]

Example from docs:

EntityValue[Entity["Bridge", "GoldenGateBridge::j6798"], "LongestSpan"]

All of these are returning this error message:

$CharacterEncoding::charcode: CloudObject`ToCharacterEncoding[TEXT/PLAIN,ISO8859-1] is not a valid character encoding. Possible settings are the names given by $CharacterEncodings or None. >>

Followed by this error message:

Import::charcode: CloudObject`ToCharacterEncoding[TEXT/PLAIN,ISO8859-1] is not a valid character encoding. Possible settings are the names given by $CharacterEncodings or None. >>

The function then fails to return the entity property. I am working on a Mac running OS X 10.10.5 using Wolfram Desktop. I'm not sure what I'm doing wrong. If someone could clue me in, I would be grateful.

Thanks in advance,

Mark Greenberg

POSTED BY: Mark Greenberg
2 Replies
Posted 8 years ago

Thank you, Sander, for your response. Sometimes my head is so full of functions and such that I don't see the obvious fix. You said that these functions work on your machine, so I restarted my machine and, voila, the functions began working. I suspect that another application, perhaps Open Office, changed the character encoding from the default. After restarting, it reset to UTF-8, like yours.

Next time I'll restart before asking. : \

POSTED BY: Mark Greenberg

I'm not sure either, but I can confirm all of these work fine on my machine (Mac 10.11.5 using Mathematica).

What is your value of:

$CharacterEncoding

?

Mine is UTF-8.

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract