# Tk-maya read another config rather than uploaded config?

**URL:** <https://community.shotgridsoftware.com/t/tk-maya-read-another-config-rather-than-uploaded-config/10268>\
**Category:** Pipeline Integrations\
**Created:** [October 4, 2020, 1:18pm UTC](https://community.shotgridsoftware.com/t/tk-maya-read-another-config-rather-than-uploaded-config/10268 "2020-10-04T13:18:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnnyzxt](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/johnnyzxt/32/2031_2.png) [@johnnyzxt](https://community.shotgridsoftware.com/u/johnnyzxt)\
**Post date:** [October 4, 2020, 1:18pm UTC](https://community.shotgridsoftware.com/t/tk-maya-read-another-config-rather-than-uploaded-config/10268/1 "2020-10-04T13:18:12Z")

</div>

Hi, there:  
Today I found another problem when I use my Maya. Although it still has some problems with my previs post topic [here](https://community.shotgridsoftware.com/t/asset-saved-then-can-not-publish/10254). but I met another one.  
I used distributed config and uploaded my config content to shotgun website with workfile2 setting “allow\_task\_creation” set to false, but after I reloaded in Maya, and in the shotgun menu, file open, and then selected “New File” button, first time it was OK, but with twice operation(shotgun menu --\> file open --\> new file again),the workfile2 setting “allow\_task\_creation” jumped to true…  
I don’t know where the config is in my cache folder on Mac（/library/caches/shotgun/app\_store??), and I don’t know why desktop can’t read the config file(with workfile2 setting “allow\_taks\_creation: false”) that I already uploaded to shotgun website.  
If you can help, thanks a lot.

---

<div class="post-metadata">

**Author:** ![philip.scadding](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/philip.scadding/32/30_2.png) [@philip.scadding](https://community.shotgridsoftware.com/u/philip.scadding)\
**Post date:** [October 6, 2020, 9:46am UTC](https://community.shotgridsoftware.com/t/tk-maya-read-another-config-rather-than-uploaded-config/10268/2 "2020-10-06T09:46:45Z")

</div>

Hi @johnnyzxt!

# Checking the Cache

So first off [this link](https://developer.shotgunsoftware.com/7c9867c0/) can help you find your cache folder on mac.

What happens when using an uploaded config, is that you will have a cached `pipeline_configuration.yml` file stored in:

```plaintext
/Users/{UserName}/Library/Caches/Shotgun/{YourSiteName}/p{Project 
 ID}c{PipelineConfiguration ID}.basic.maya/cfg/config/core/install_location.yml

```

In that file it should have a line that looks a bit like this:

```yaml
source_descriptor: {entity_type: PipelineConfiguration, field: uploaded_config, id: 859,
  type: shotgun, version: 5192}

```

This should confirm which version of the config your project is using from the bundle cache.  
You can then check in:

```plaintext
/Users/{UserName}/Library/Caches/Shotgun/bundle_cache/sg/{YourSiteName}/v5192

```

To see that actual config it will use.

# Checking cache location from Maya

Also in Maya when launched with Shotgun you could run the following in the Maya Python script editor:

```python
import sgtk
engine = sgtk.platform.current_engine()

# Get the project cached config location.
engine.get_project_cache_location(engine.context.project["id"])
# Result: /Users/{username}/Library/Caches/Shotgun/{sg site name}/p89c859.basic.desktop/tk-maya

# Get the config location in the bundle cache.
engine.sgtk.configuration_descriptor.get_path()
# Result: /Users/{username}/Library/Caches/Shotgun/bundle_cache/sg/{sg site name}/v5192

```

# Why it may not be working

By default, the `tk-config-default2` will be cached when you select the project in SG Desktop. When you launch the software from Desktop it will not recache the config, and Maya for example will use the Desktop cache, so you will see that the cached folder is likely pointing to something like `p89c859.basic.desktop` rather than `p89c859.basic.maya`. In order for your changes to be pulled, you will need to jump out of the project in SG Desktop and back in again, and relaunch Maya.

If you’re making dev changes I would recommend using the dev descriptor to make rapid changes and then switch to uploaded config once you’re ready to deploy to production.

> [@Distributed config management workflow](https://community.shotgridsoftware.com/t/distributed-config-management-workflow/232):
>
> I’ve seen the question come up a few times around how to test configuration changes and push them to production when using a [distributed config](https://developer.shotgunsoftware.com/tk-core/initializing.html#distributed-configurations) setup. My personal recommendation would be to do the following: Assuming your project already has a “primary” PipelineConfiguration entity with an uploaded config, I would create a second one called dev. Set a [dev descriptor](https://developer.shotgunsoftware.com/tk-core/descriptor.html#pointing-to-a-path-on-disk) to define a location to your config on disk. (If you haven’t got a config on disk you can download the primary config and unzi…

---

<div class="post-metadata">

**Author:** ![johnnyzxt](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/johnnyzxt/32/2031_2.png) [@johnnyzxt](https://community.shotgridsoftware.com/u/johnnyzxt)\
**Post date:** [October 6, 2020, 6:00pm UTC](https://community.shotgridsoftware.com/t/tk-maya-read-another-config-rather-than-uploaded-config/10268/3 "2020-10-06T18:00:49Z")

</div>

Great appreciate, @philip.scadding ,you help me a lot, not in this post only, I’ve read a lot of tutorials from you, greate thanks
