# Internal TileDB uncaught exception; basic\_string::compare:

**URL:** https://forum.tiledb.com/t/internal-tiledb-uncaught-exception-basic-string/267
**Category:** Uncategorized
**Created:** [November 6, 2020, 11:11am UTC](https://forum.tiledb.com/t/internal-tiledb-uncaught-exception-basic-string/267 "2020-11-06T11:11:20Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ilveroluca](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/ilveroluca/32/112_2.png) [@ilveroluca](https://forum.tiledb.com/u/ilveroluca)
#### Post date: [November 6, 2020, 11:11am UTC](https://forum.tiledb.com/t/internal-tiledb-uncaught-exception-basic-string/267/1 "2020-11-06T11:11:20Z")

</div>

Hi,

I’m trying to port a Python program from an HDFS back end to S3. Running some simple tests I’m getting an uncaught exception from TileDB. As s3 back ends, I have tried both minio and the Ceph object store. Here’s an example with a stack trace from pytest:

```auto
    def test_basic_tiledb_s3_operativity(clean_s3):
        import tiledb

        uri = 's3://firstbucket/basic-tiledb-s3-operativity'
        config = tiledb.Config(params={
            'vfs.s3.aws_access_key_id': 'tdm-user',
            'vfs.s3.aws_secret_access_key': 'tdm-user-s3',
            'vfs.s3.endpoint_override': 'minio:9000',
            'vfs.s3.scheme': 'http',
            'vfs.s3.region': '',
            'vfs.s3.verify_ssl': 'false',
            'vfs.s3.use_virtual_addressing': 'false',
            'vfs.s3.use_multipart_upload': 'false'})
        ctx = tiledb.Ctx(config=config)
    
        a = np.arange(5)
        logging.debug("trying to write array to s3: %s", uri)
        schema = tiledb.schema_like(a, ctx=ctx)
> tiledb.DenseArray.create(uri, schema)

tests/client/test_non_scalar_source.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tiledb/libtiledb.pyx:3697: in tiledb.libtiledb.Array.create
    ???
tiledb/libtiledb.pyx:481: in tiledb.libtiledb._raise_ctx_err
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

> ???
E tiledb.libtiledb.TileDBError: Error: Internal TileDB uncaught exception; basic_string::compare: __pos (which is 18446744073709551615) > this->size() (which is 4)

tiledb/libtiledb.pyx:466: TileDBError

```

In other test, the same unhandled exception is raised from `tiledb.object_type(uri, context)`. While the stack trace in that case is different, the exception message is identical:

```
tiledb.libtiledb.TileDBError: Error: Internal TileDB uncaught exception; basic_string::compare: __pos (which is 18446744073709551615) > this->size() (which is 4)

```

TileDB version: 0.7.0

I’m running in docker. I have built my own image and installed tiledb with `pip`.

Any hints?

Thanks,

Luca

---

<div class="post-metadata">

### Author: ![ilveroluca](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/ilveroluca/32/112_2.png) [@ilveroluca](https://forum.tiledb.com/u/ilveroluca)
#### Post date: [November 6, 2020, 11:55am UTC](https://forum.tiledb.com/t/internal-tiledb-uncaught-exception-basic-string/267/2 "2020-11-06T11:55:12Z")

</div>

I’ll add a detail that seems relevant: sometimes, this test passes.

My complete test scenario first executes a function that uses boto to delete any objects in the s3 bucket (that’s the `clean_s3` pytest fixture left in the code I pasted), then executes the test function. If I launch the test a few times in quick succession, the first time it’ll pass; subsequent attempts all fail with the same exception.

---

<div class="post-metadata">

### Author: ![joe\_maley](https://avatars.discourse-cdn.com/v4/letter/j/bc79bd/32.png) [@joe\_maley](https://forum.tiledb.com/u/joe_maley)
#### Post date: [November 6, 2020, 1:45pm UTC](https://forum.tiledb.com/t/internal-tiledb-uncaught-exception-basic-string/267/3 "2020-11-06T13:45:23Z")

</div>

Hi @ilveroluca –

Thanks for the report. I’m working on reproducing this to see what’s going wrong. I’ll let you know once I have an update.

---

<div class="post-metadata">

### Author: ![ilveroluca](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/ilveroluca/32/112_2.png) [@ilveroluca](https://forum.tiledb.com/u/ilveroluca)
#### Post date: [November 6, 2020, 2:31pm UTC](https://forum.tiledb.com/t/internal-tiledb-uncaught-exception-basic-string/267/4 "2020-11-06T14:31:32Z")

</div>

Hi Joe,

I opened an issue on Github with a smaller code snipped sufficient to reproduce the problem. Here’s the link: [https://github.com/TileDB-Inc/TileDB-Py/issues/409](https://github.com/TileDB-Inc/TileDB-Py/issues/409)

Since posting, I have confirmed that TileDB 0.6.1 doesn’t have the issue (I tried both your docker image on DockerHub and I rebuilt my own). I’m currently working on testing TileDB 0.6.6.

---

<div class="post-metadata">

### Author: ![ilveroluca](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/ilveroluca/32/112_2.png) [@ilveroluca](https://forum.tiledb.com/u/ilveroluca)
#### Post date: [November 6, 2020, 2:33pm UTC](https://forum.tiledb.com/t/internal-tiledb-uncaught-exception-basic-string/267/5 "2020-11-06T14:33:34Z")

</div>

0.6.6 also works. It looks like a regression in 0.7.0.
