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.
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
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:
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.