Search Unity

Reflect Assistance with error on import: Illegal characters in path.

Discussion in 'Unity Reflect' started by lightmapper, Dec 24, 2020.

  1. lightmapper

    lightmapper

    Joined:
    Jan 14, 2015
    Posts:
    27
    Hello,

    I've spent hours attempting to debug this one, so I am hoping someone here can provide some advice. I get the following error when importing from reflect into Unity. With the debugger I can see one of the syncmesh (Precast Cornice_10_ [xxx] [xxx].SyncMesh) paths causes the error because it has an Illegal char in it.

    - Is there a way to fix this without changing the original data source?
    - Is there an easy way to find the specific model causing this issue in revit?


    System.AggregateException: One or more errors occurred. ---> System.ArgumentException: Illegal characters in path.
    at System.IO.Path.Combine (System.String path1, System.String path2) [0x00057] in <9577ac7a62ef43179789031239ba8798>:0
    at UnityEditor.Reflect.SyncInstance.GenerateSyncPrefabFromManifest (System.String name, System.String rootFolder, Unity.Reflect.Data.SyncManifest manifest) [0x00033] in C:\Users\paperspace\Fendi\Library\PackageCache\com.unity.reflect@2.0.0-preview.11\Editor\SyncInstance.cs:308
    at ReflectProjectDownloader+<DownloadManifestDiff>d__13.MoveNext () [0x00227] in C:\Users\paperspace\Fendi\Library\PackageCache\com.unity.reflect@2.0.0-preview.11\Editor\ReflectProjectDownloader.cs:209
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <9577ac7a62ef43179789031239ba8798>:0
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <9577ac7a62ef43179789031239ba8798>:0
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <9577ac7a62ef43179789031239ba8798>:0
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <9577ac7a62ef43179789031239ba8798>:0
    at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
    at ReflectProjectDownloader+<DownloadProject>d__12.MoveNext () [0x0021f] in C:\Users\paperspace\Fendi\Library\PackageCache\com.unity.reflect@2.0.0-preview.11\Editor\ReflectProjectDownloader.cs:140
    --- End of inner exception stack trace ---
    ---> (Inner Exception #0) System.ArgumentException: Illegal characters in path.
    at System.IO.Path.Combine (System.String path1, System.String path2) [0x00057] in <9577ac7a62ef43179789031239ba8798>:0
    at UnityEditor.Reflect.SyncInstance.GenerateSyncPrefabFromManifest (System.String name, System.String rootFolder, Unity.Reflect.Data.SyncManifest manifest) [0x00033] in C:\Users\paperspace\Fendi\Library\PackageCache\com.unity.reflect@2.0.0-preview.11\Editor\SyncInstance.cs:308
    at ReflectProjectDownloader+<DownloadManifestDiff>d__13.MoveNext () [0x00227] in C:\Users\paperspace\Fendi\Library\PackageCache\com.unity.reflect@2.0.0-preview.11\Editor\ReflectProjectDownloader.cs:209
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <9577ac7a62ef43179789031239ba8798>:0
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <9577ac7a62ef43179789031239ba8798>:0
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <9577ac7a62ef43179789031239ba8798>:0
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <9577ac7a62ef43179789031239ba8798>:0
    at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
    at ReflectProjectDownloader+<DownloadProject>d__12.MoveNext () [0x0021f] in C:\Users\paperspace\Fendi\Library\PackageCache\com.unity.reflect@2.0.0-preview.11\Editor\ReflectProjectDownloader.cs:140 <---

    UnityEngine.Debug:LogError(Object)
    <>c:<StartProjectDiscovery>b__18_1(Exception) (at Library/PackageCache/com.unity.reflect@2.0.0-preview.11/Editor/ReflectWindow.cs:141)
    <Download>d__11:MoveNext() (at Library/PackageCache/com.unity.reflect@2.0.0-preview.11/Editor/ReflectProjectDownloader.cs:84)
    Unity.EditorCoroutines.Editor.YieldProcessor:MoveNext(IEnumerator) (at Library/PackageCache/com.unity.editorcoroutines@0.0.2-preview.1/Editor/EditorCoroutine.cs:79)
    Unity.EditorCoroutines.Editor.EditorCoroutine:processIEnumeratorRecursive(IEnumerator) (at Library/PackageCache/com.unity.editorcoroutines@0.0.2-preview.1/Editor/EditorCoroutine.cs:133)
    Unity.EditorCoroutines.Editor.EditorCoroutine:MoveNext() (at Library/PackageCache/com.unity.editorcoroutines@0.0.2-preview.1/Editor/EditorCoroutine.cs:114)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
     

    Attached Files:

  2. DriesVrBase

    DriesVrBase

    Joined:
    Mar 24, 2020
    Posts:
    65
    Did you find a fix for this? having a similar issue when importing my model?
     
  3. lightmapper

    lightmapper

    Joined:
    Jan 14, 2015
    Posts:
    27
    I was able to open the project on macOS with no issue. I am assuming the original Revit file was saved on a mac and someone named something with a character that was ok on macOS but not ok on windows. You should try it.

    Another solution would be to bring the reflect packages into your project and modify its source code so it doesn't fail on that error.
     
    Last edited: Jan 7, 2021
  4. DriesVrBase

    DriesVrBase

    Joined:
    Mar 24, 2020
    Posts:
    65
    Well I don't have a character issue but it's something on creating the prefab when it imported everything, made a forum post here as well. Don't think it has something to do with macOS but could try it.

    I brought the reflect packages in as well and tried to do a try and catch on the line where the error happens but it doesn't seem to fix it. I think it's in the source code because it's on the database.refresh