Hi, I’m trying to import a sketch file but I get this:
Unhandled Exception:
SketchImporter.UserException: fuse import is unable to import your Sketch file due to an internal error. See above output for more information.
at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) <0x4817ed8 + 0x00437> in <filename unknown>:0
at SketchImporter.Program.Main (System.String[] args) <0x8ad028 + 0x005cf> in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: SketchImporter.UserException: fuse import is unable to import your Sketch file due to an internal error. See above output for more information.
at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) <0x4817ed8 + 0x00437> in <filename unknown>:0
at SketchImporter.Program.Main (System.String[] args) <0x8ad028 + 0x005cf> in <filename unknown>:0
What is wrong?
Hi, we have no idea. Can you please upload a sketch file that reproduces the issue?
Sure! How can I send you the file?
Hi Cristian,
I haven’t been able to reproduce this issue locally with Fuse 0.32.2 (the latest release). Could you please run ‘sketchtool --version’ and tell me what is says? Also it would be helpful to know the path to your Sketch-installation.
says sketchtool Version 42 (36781)
I’ve now tested with the same version of sketchtool as you have installed and I’m still not able to reproduce. I’ve tested both importing by drag’n drop into the preview and importing from the command line.
Could you give a step-by-step description on what you are doing? It would also be helpful to know your OS version. It would also be interesting to know if you get the same error if you try to import it into an empty and/or example app (running fuse create example Foo, then import the file into Foo).
Thanks for the reply!
This is what I do:
-
I create a new Fuse project like this:
![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/1Y2rqHBhD7Ia-image-1487079069313.30.56 AM.png)
-
I drag the Sketch project to my Fuse project folder
-
I open my project in Terminal (I have a Mac with OSX 10.11.6, El Capitan)
-
I type fuse import MyProject.sketch
-
I get:
Unhandled Exception:
SketchImporter.UserException: fuse import is unable to import your Sketch file due to an internal error. See above output for more information.
at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) <0x4809008 + 0x00437> in <filename unknown>:0
at SketchImporter.Program.Main (System.String[] args) <0x8a0028 + 0x005cf> in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: SketchImporter.UserException: fuse import is unable to import your Sketch file due to an internal error. See above output for more information.
at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) <0x4809008 + 0x00437> in <filename unknown>:0
at SketchImporter.Program.Main (System.String[] args) <0x8a0028 + 0x005cf> in <filename unknown>:0
```
Right If you don’t copy the sketch-file to the project folder, but instead import using the path (full or relative) to the sketch-file, it should work.
That was a really unhelpful error message though. I’ll make an issue to fix this, at least give some better error message
Hello,
I am having this same issue! My versions of Sketch and Sketch Tools are both up-to-date. I have not moved the Sketch file into Fuse Project file, because I am using the drag and drop method. I actually had it work with a different Fuse and Sketch file today and now no matter what I do I always get this error…
Unhandled Exception: System.IO.IOException: Win32 IO returned ERROR_ALREADY_EXISTS. Path: at System.IO.File.Move (System.String sourceFileName, System.String destFileName) <0x26fa6c0 + 0x002e7> in :0 at SketchImporter.Program.Main (System.String[] args) <0x767028 + 0x004d7> in :0 [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.IOException: Win32 IO returned ERROR_ALREADY_EXISTS. Path: at System.IO.File.Move (System.String sourceFileName, System.String destFileName) <0x26fa6c0 + 0x002e7> in :0 at SketchImporter.Program.Main (System.String[] args) <0x767028 + 0x004d7> in :0 Drop operation failed: An error occurred on import
Hi Audrey,
The sketch importer creates a folder with the assets and a ux-file named after your sketch-file. Could you try to manually remove these and import again?
You can open the project folder through the Project
-menu, Open project folder
, mark <your-sketch-file>.sketch.ux
and <your-sketch-file>.sketch-assets
and move them to the trash folder. Try to import again and see if you experience the same issue?
Thanks for your reply, When I drag and drop my Sketch file into the Fuse preview window, it copies my Sketch file into the Project folder, then immediately gives me this error. It does not create the Ux and Assets file in the project folder.
Does the name of your sketch-file contain spaces by any chance? Not all systems handle spaces in filenames all that well, so the sketch-importer copies the sketch-file to the fuse project file and replaces all spaces with underscore. This copied file is deleted at the end of the import process, but if something went wrong it might still be laying around in the fuse project folder.
If for example my sketch-file was named Foo Bar.sketch
then I get a temporary file called Foo_Bar.sketch
during import. And if this for some reason wasn’t deleted as it should have been then I get the same error you pasted above. If you delete this file the import should work.
To avoid this problem try to rename your original sketch file to something without spaces (or other special characters) if possible.
If the sketch-file name does not contain any spaces or special characters then running the import command from the command line could be helpful. Open a terminal through Project -> Open in Terminal
then run
fuse import <path-to-sketch-file>
where you replace <path-to-sketch-file>
with the path name to the file you want to import.
Hope this was somewhat more helpful
I think the spaces in the file name may have been the issue. Thanks!