Group Abstract Group Abstract

Message Boards Message Boards

0
|
14.3K Views
|
5 Replies
|
1 Total Like
View groups...
Share
Share this post:

SemanticImport fails for every file in Mathematica 11.0

Posted 10 years ago
POSTED BY: Dave Middleton
5 Replies
POSTED BY: Ilian Gachevski
Posted 8 years ago

For Windows I just learned that you can get the "SemanticImport::unexpinvaliderr: Unexpected invalid input was detected. Processing will not continue" message, if the name of your "TemporaryDirectory" contains a space. So you can solve it by setting $TemporaryDirectory to an other existing(!) directory (or create it first) without a space in the name. Example:

CreateDirectory["C:\temp"]

$TemporaryDirectory = "C:\temp"

This is propably the reason why SemanticImport, works for some and not for others. I don't know if the same is true for Mac OS.

POSTED BY: Ron Westdijk
Posted 9 years ago

Hi, thanks for the reply.

I don't think the C:\temp directory exists, I cannot find anything on my computer - neither through the search nor through navigating in my directory. Is there a solution that would work for me then?

Edit: Actually, I found a "Temp" directory in C:\ Program Files (x86)\ Temp, so I tried it with that. My code looks following:

Block[{$TemporaryDirectory = "C:\\Program Files (x86)\\Temp"}, 
 SemanticImport["C:\\data.csv" <|2 -> String, 3 -> Integer|>]]

But it still tells me that the File is not found during SemanticImport (I even used the insert File Path option). Not sure what the problem is here.

Thanks

POSTED BY: Luka Vucicevic
Posted 9 years ago

Hello everyone

I have just started using Mathematica and am running into a bit of the same as described here problem. When using SemanticImport, I always get the same error:

"SemanticImport::unexpinvaliderr: Unexpected invalid input was detected. Processing will not continue"

I tried putting my file in different paths as well, seeing as sometimes the symbols in my paths are messing with some programs. I tried paths with the user in it, without the user, putting it straight into my "C:" directory, having it in my Mathematica folder etc. Nothing has worked so far. In the link that I posted, it said that using the following method would temporarily fix the problem

Block[{$TemporaryDirectory = "C:\\temp"}, SemanticImport["ExampleData/RetailSales.tsv"]]

but that just gives me the following error:

"SemanticImport::temperr: $TemporaryDirectory is not an existing directory."

Does anyone have a workaround for this problem / knows what I could do to fix it?

Thanks

POSTED BY: Luka Vucicevic

Works fine on Mac OSX.

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