Message Boards Message Boards

SemanticImport fails for every file in Mathematica 11.0

GROUPS:

This is a follow up on this post.

Using SemanticImport on any file, even those mentioned in the Documentation examples e.g. :

SemanticImport["ExampleData/RetailSales.tsv"]

Gives an error:

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

I came across an issue with the SemanticImport as my previous attempt to import a large csv file caused a crash of the Mathematica Kernel and took Windows 10 Pro 64-bit with it as it consumed all remaining 4GB RAM.

The work-around mentioned in the aforementioned post still works i.e. make sure you change the path to the temp directory i.e.

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

Is this a known bug?

Cheers,

Dave

POSTED BY: Dave Middleton
Answer
1 year ago

Works fine on Mac OSX.

POSTED BY: Sander Huisman
Answer
1 year 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
Answer
2 months ago

Is the following (mentioned in the original post) true?

(assuming the C:\temp directory exists and is writable by the current user)

POSTED BY: Ilian Gachevski
Answer
2 months 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
Answer
2 months ago

Group Abstract Group Abstract