# Import dialog

**URL:** <https://forums.unrealengine.com/t/import-dialog/123246>\
**Category:** Editor Scripting\
**Tags:** unreal-engine\
**Created:** [March 7, 2019, 10:44am UTC](https://forums.unrealengine.com/t/import-dialog/123246 "2019-03-07T10:44:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Code\_Goblin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Code\_Goblin](https://forums.unrealengine.com/u/Code_Goblin)\
**Post date:** [March 7, 2019, 10:44am UTC](https://forums.unrealengine.com/t/import-dialog/123246/1 "2019-03-07T10:44:35Z")

</div>

I’m trying to figure out if there’s a way to summon a file browser type dialog that I can use to import assets with custom import options. I’ve tried:

```auto

unreal.AssetTools.import_assets_with_dialog('/Game/tmp')

```

…but I get the following error:

```auto

Error: TypeError: descriptor 'import_assets_with_dialog' requires a 'AssetTools' object but received a 'str'

```

From the UE Python documentation for _AssetTools_:

> [@](#):
>
> **import\_assets\_with\_dialog** \*(destination\_path) -\> Array(Object)\* Opens a file open dialog to choose files to import to the destination path.
> 
> **Parameters: destination\_path** (str) – Path to import files to  
> **Returns:** list of successfully imported assets  
> **Return type:** Array(Object)

So I’m confused… The documentation seems to clearly state that destination\_path needs to be a string. So why is Unreal complaining that it should be an AssetTools object?

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [March 7, 2019, 7:31pm UTC](https://forums.unrealengine.com/t/import-dialog/123246/2 "2019-03-07T19:31:03Z")

</div>

import\_assets\_with\_dialog is a method, so you need to call it on an instance rather than the type. The error is trying to say that the ‘self’ argument was the wrong type.

```auto

asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
asset_tools.import_assets_with_dialog('/Game/tmp')

```

---

<div class="post-metadata">

**Author:** ![Code\_Goblin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Code\_Goblin](https://forums.unrealengine.com/u/Code_Goblin)\
**Post date:** [March 8, 2019, 10:47am UTC](https://forums.unrealengine.com/t/import-dialog/123246/3 "2019-03-08T10:47:11Z")

</div>

Great, that worked. It seems that I need to get better at understanding Python error messages. The fact that the error complained about an object and not a parameter was probably a good hint that the part that was wrong wasn’t the bit inside the brackets.

Thank you Jamie.
