# Can't Consolidate - "Got Multiple Arguments for URI"

**URL:** <https://forum.tiledb.com/t/cant-consolidate-got-multiple-arguments-for-uri/209>\
**Category:** Uncategorized\
**Created:** [June 19, 2020, 12:55am UTC](https://forum.tiledb.com/t/cant-consolidate-got-multiple-arguments-for-uri/209 "2020-06-19T00:55:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jake](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@Jake](https://forum.tiledb.com/u/Jake)\
**Post date:** [June 19, 2020, 12:55am UTC](https://forum.tiledb.com/t/cant-consolidate-got-multiple-arguments-for-uri/209/1 "2020-06-19T00:55:10Z")

</div>

Hey,

I’m trying to consolidate the fragments of an array but am getting an error message I can’t get to the bottom of.I’m carrying out the following operation:

```auto
config = tiledb.Config({'sm.consolidation.mode': 'fragments'})

with tiledb.open('path/to/array', 'w') as TileDB_array:
    TileDB_array.consolidate(config)

```

And get returned:

> TypeError: consolidate() got multiple values for keyword argument ‘uri’

Does anyone know how I can solve this?

I’m using v2 of TileDB and the latest Python version

---

<div class="post-metadata">

**Author:** ![ihnorton](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/ihnorton/32/23_2.png) [@ihnorton](https://forum.tiledb.com/u/ihnorton)\
**Post date:** [June 19, 2020, 2:39am UTC](https://forum.tiledb.com/t/cant-consolidate-got-multiple-arguments-for-uri/209/2 "2020-06-19T02:39:16Z")

</div>

Hi @jake,

We’ll fix the `array.consolidate(...)` version in the next point release, but the top-level function will also work for now:

```auto
tiledb.consolidate("/path/to/array", config=config)

```

HTH,  
Isaiah

---

<div class="post-metadata">

**Author:** ![Jake](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@Jake](https://forum.tiledb.com/u/Jake)\
**Post date:** [June 19, 2020, 9:35am UTC](https://forum.tiledb.com/t/cant-consolidate-got-multiple-arguments-for-uri/209/3 "2020-06-19T09:35:18Z")

</div>

Hi @ihnorton,

Thanks for response and suggestions.

I’ve just tried …

```auto
array_dir = f'/path/to/array'.replace('/', '\\')
config = tiledb.Config({'sm.consolidation.mode': 'fragments'})

tiledb.consolidate(array_dir, config=config)

```

… and it appears to run succesfully with no errors raised but the fragments are still fragmented. It also returns the path of the array which I assume is related to the operation being carried out successfully?

I’ve tried this on multiple arrays with a few different config parameters to no luck.

Thanks!  
Jake

---

<div class="post-metadata">

**Author:** ![ihnorton](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/ihnorton/32/23_2.png) [@ihnorton](https://forum.tiledb.com/u/ihnorton)\
**Post date:** [June 19, 2020, 1:50pm UTC](https://forum.tiledb.com/t/cant-consolidate-got-multiple-arguments-for-uri/209/4 "2020-06-19T13:50:44Z")

</div>

Hi @Jake,

TileDB provides [versioned arrays](https://docs.tiledb.com/main/api-usage/reading-arrays/time-traveling) to facilitate “time-traveling” over different data views, which can be useful in a number of different applications. Due to a number of requests, the latest core TileDB release _does not_ remove consolidated fragments by default during the `consolidation` step. This preserves the capability to open the array at an earlier timepoint while still providing the improved performance of a consolidated view.

In order to remove the prior fragments, there is a new “vacuum” step, which is documented [here](https://docs.tiledb.com/main/api-usage/consolidating-arrays#post-consolidation-vacuuming). Consolidation and vacuuming may be restricted to [array metadata](https://docs.tiledb.com/main/basic-concepts/array-metadata) or [fragment footers](https://docs.tiledb.com/main/basic-concepts/fragment-metadata) (range information) with the `sm.consolidation.mode` [configuration parameter](https://docs.tiledb.com/main/configuration-parameters).

Best,  
Isaiah
