# AttributeError: 'WeaviateClient' object has no attribute 'schema'

**URL:** <https://forum.weaviate.io/t/attributeerror-weaviateclient-object-has-no-attribute-schema/2433>\
**Category:** Support\
**Created:** [May 22, 2024, 8:52pm UTC](https://forum.weaviate.io/t/attributeerror-weaviateclient-object-has-no-attribute-schema/2433 "2024-05-22T20:52:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nick-youngblut](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/nick-youngblut/32/1567_2.png) [@nick-youngblut](https://forum.weaviate.io/u/nick-youngblut)\
**Post date:** [May 22, 2024, 8:52pm UTC](https://forum.weaviate.io/t/attributeerror-weaviateclient-object-has-no-attribute-schema/2433/1 "2024-05-22T20:52:52Z")

</div>

I’m trying to update my code from v3 to v4, but I’m finding the migration code lacking in basic info, such as simply how one would update `client.schema.get()` to v4. What is the equivalent in v4?

---

<div class="post-metadata">

**Author:** ![bobvanluijt](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/bobvanluijt/32/23_2.png) [@bobvanluijt](https://forum.weaviate.io/u/bobvanluijt)\
**Post date:** [May 26, 2024, 10:21pm UTC](https://forum.weaviate.io/t/attributeerror-weaviateclient-object-has-no-attribute-schema/2433/2 "2024-05-26T22:21:11Z")

</div>

cc: @sebastian and @DaveCuthbert

---

<div class="post-metadata">

**Author:** ![sebawita](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/sebawita/32/5_2.png) [@sebawita](https://forum.weaviate.io/u/sebawita)\
**Post date:** [May 27, 2024, 11:14am UTC](https://forum.weaviate.io/t/attributeerror-weaviateclient-object-has-no-attribute-schema/2433/3 "2024-05-27T11:14:47Z")

</div>

Hi @nick-youngblut, thank you for reaching out.

> [@nick-youngblut](#):
>
> `client.schema.get()` to v4. What is the equivalent in v4?

## Naming convention

In V4 we changed the naming convention around the `schema`, we call it now `collection configuration`.  
And `property schema` refers to type definition for all properties in a collection (but this doesn’t include vectorizers or index configuration).

## Get Collection Config

To get collection configuration (what we used to call schema), you can call:

**A) Get all collections**  
You can request a dictionary with all collection configurations.  
Then, you can access each collection with the collection name as a key.

```python
# Get all collection
col_configs = client.collections.list_all()

# Print all collection names
for name in col_configs:
    print(name)

# Print one collection configuration
print(col_configs["MyCollection"])
print(col_configs["MyCollection"].properties) # property schema
print(col_configs["MyCollection"].vectorizer_config) # vectorizer configuration
print(col_configs["MyCollection"].vectorizer) # vectorizer name

```

**B) Get selected collection**  
You can get the collection configuration from the collection object.  
(I personally prefer to work with the `collection` object as my gateway to 99% of what I do with Weaviate).

```python
collection = client.collections.get("MyCollection")
config = collection.config.get()

print(config)

```

## Happy to help

Let me know if we can help with other examples.  
In the meantime, we will update the docs with extra examples of before (v3) and after (v4).

---

<div class="post-metadata">

**Author:** ![nick-youngblut](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/nick-youngblut/32/1567_2.png) [@nick-youngblut](https://forum.weaviate.io/u/nick-youngblut)\
**Post date:** [May 27, 2024, 9:06pm UTC](https://forum.weaviate.io/t/attributeerror-weaviateclient-object-has-no-attribute-schema/2433/4 "2024-05-27T21:06:46Z")

</div>

Thanks @sebawita! Where is `client.collections.list_all()` described in the docs? I don’t see it at [Migrate from v3 to v4](https://weaviate.io/developers/weaviate/client-libraries/python/v3_v4_migration#interaction-with-collections) or elsewhere.

---

<div class="post-metadata">

**Author:** ![sebawita](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/sebawita/32/5_2.png) [@sebawita](https://forum.weaviate.io/u/sebawita)\
**Post date:** [May 27, 2024, 10:32pm UTC](https://forum.weaviate.io/t/attributeerror-weaviateclient-object-has-no-attribute-schema/2433/5 "2024-05-27T22:32:12Z")

</div>

Hi Nick,  
`list_all` is not listed (pun not intended) in the migration docs, but we can add it there in case others miss that one too.

We have it covered in the [Manage Collections docs](https://weaviate.io/developers/weaviate/manage-data/collections#read-all-collection-definitions), but I can see why this wouldn’t be easy when you are used to working with the v3 client.

Let me know if I can point you towards other functions 😉
