# MacOS python file paths error: "Datasmith import error: source uri could not be resolved to an external source"

**URL:** <https://forums.unrealengine.com/t/macos-python-file-paths-error-datasmith-import-error-source-uri-could-not-be-resolved-to-an-external-source/2678708>\
**Category:** Programming & Scripting\
**Tags:** Python, Datasmith, unreal-engine, question\
**Created:** [November 25, 2025, 6:26pm UTC](https://forums.unrealengine.com/t/macos-python-file-paths-error-datasmith-import-error-source-uri-could-not-be-resolved-to-an-external-source/2678708 "2025-11-25T18:26:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mainframenzo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mainframenzo](https://forums.unrealengine.com/u/mainframenzo)\
**Post date:** [November 25, 2025, 6:26pm UTC](https://forums.unrealengine.com/t/macos-python-file-paths-error-datasmith-import-error-source-uri-could-not-be-resolved-to-an-external-source/2678708/1 "2025-11-25T18:26:15Z")

</div>

When I try to use Datasmith to import a (CAD) file on MacOS in a Python script, I get the error: “Datasmith import error: source uri could not be resolved to an external source”. I am using the absolute path, which has spaces. I have tried all sorts of variations of escaping those spaces. I have tried putting the file in the project’s content folder, or not! I am using unreal 5.7 and invoking the script like so: `/Users/Shared/Epic\ Games/UE_5.7/Engine/Binaries/Mac/UnrealEditor-cmd “/Users/me/Desktop/MyProject/MyProject.uproject” -RenderOffscreen -stdout -log -ExecutePythonScript=“/Users/me/Desktop/main.py”`, where main.py is invoking Datasmith like so:

`import unreal`  
`…`  
`ds_scene_in_memory = unreal.DatasmithSceneElement.construct_datasmith_scene_from_file("/Users/me/Desktop/My Assembly With Spaces.SLDASM")`

I can use the MacOS terminal to `open `“/Users/me/Desktop/My Assembly With Spaces.SLDASM"` with other software - the path exists! Is there something I am missing?`
