Flow Sync Error -- Missing Code key and an issue with hierarchy

Dear All,
Thank you for this add-on.
I am currently setting up the sync between AYON and Flow.
However, the doc available seems a bit outdated and it seems it does not provide all information needed.

I added some new fields to project to make the sync work (after checking on log events)

Now it is running for shots and sequences, but it does provide an error as soon as an episode is created (and if I link a sequence to an episode at its creation, it is also put as an error).

An error occurred while processing. Shotgrid Event ID: 490001.
Message
Traceback (most recent call last):
  File "/service/processor/processor.py", line 251, in start_processing
    handler.process_event(
  File "/service/processor/handlers/shotgrid_event.py", line 37, in process_event
    hub.react_to_shotgrid_event(sg_payload["meta"])
  File "/service/ayon_shotgrid_hub/__init__.py", line 338, in react_to_shotgrid_event
    create_ay_entity_from_sg_event(
  File "/service/ayon_shotgrid_hub/update_from_shotgrid.py", line 134, in create_ay_entity_from_sg_event
    ay_parent_entity = _get_ayon_parent_entity(
                       ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/service/ayon_shotgrid_hub/update_from_shotgrid.py", line 273, in _get_ayon_parent_entity
    sg_parent_entity_dict = get_sg_entity_as_ay_dict(
                            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/service/utils.py", line 982, in get_sg_entity_as_ay_dict
    sg_ay_dict = _sg_to_ay_dict(
                 ^^^^^^^^^^^^^^^
  File "/service/utils.py", line 146, in _sg_to_ay_dict
    name = slugify_string(sg_entity[project_code_field], min_length=0)
                          ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
KeyError: 'Code'

I’m using Shot Grid Add-on 0.5.2

Any clue to solve this and get the proper hierarchy Episode>Sequence>Shot ?

Thanks a lot,

The error you’ve provided is complaining about missing Code value. I think it might be referring to the project code. Information about setting project code: Flow (ShotGrid) | AYON Docs.

Hi,
I had to delete and restart services to make it work …

Now I have an issue regarding Hierarchy, since Episodes seem not to be linked to sequences …
Any chance someone made it to get episode>sequence>shot ?

I tried several ways in the shotgrid root relocation, but each time episode appears as a separate item, independant from the sequence (I also checked on shotgrid side, sequences should be dependant on episodes).

Hi Damien,

you can follow this bug here…

https:________//discord.com/channels/517362899170230292/1319221547315105892

1 Like