# New Counterbalance Component + Shelf

**URL:** <https://discourse.psychopy.org/t/new-counterbalance-component-shelf/43057>\
**Category:** Online experiments\
**Created:** [November 24, 2024, 4:25pm UTC](https://discourse.psychopy.org/t/new-counterbalance-component-shelf/43057 "2024-11-24T16:25:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wendyross](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wendyross](https://discourse.psychopy.org/u/wendyross)\
**Post date:** [November 24, 2024, 4:25pm UTC](https://discourse.psychopy.org/t/new-counterbalance-component-shelf/43057/1 "2024-11-24T16:25:23Z")

</div>

URL of experiment:

Description of the problem:

Hello, I am trying to counterbalance two groups online using the new component and shelf feature.

I have set tup counterbalance like this

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/1/a/1aedf4bdc262777a6f7ca6f7a102d93573894124.png)

I then have this code component:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/2/e/2ec9dbe170b84b5c58e968452f7cf93c34c73e2e.png)

p.s. for those who are not as confident like me it took me a while to realise the groups would be 0,1 rather than 1,2.

Then I move to the shelf where I do this:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/6/8/685565814bc727db85e13dbbbbbd4e79390a3290.png)

I have tried with key as counterbalance - the name of my component - and counterbalance.group but both give me this:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/0/e/0e064e64638869d772da5018c4cdaa83d4d8f5ee.png)

Any help would be much appreciated.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [November 24, 2024, 4:30pm UTC](https://discourse.psychopy.org/t/new-counterbalance-component-shelf/43057/3 "2024-11-24T16:30:10Z")

</div>

Your counterbalance entry on the shelf should be called counterbalance not counterbalance.group

---

<div class="post-metadata">

**Author:** ![wendyross](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wendyross](https://discourse.psychopy.org/u/wendyross)\
**Post date:** [November 24, 2024, 4:43pm UTC](https://discourse.psychopy.org/t/new-counterbalance-component-shelf/43057/4 "2024-11-24T16:43:58Z")

</div>

I tried that and in a incognito tab but it still comes up with the same error. I have tried it with groups labelled A and B as in the documentation but still the same error.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [November 24, 2024, 4:45pm UTC](https://discourse.psychopy.org/t/new-counterbalance-component-shelf/43057/5 "2024-11-24T16:45:47Z")

</div>

counterbalance.group isn’t available to your experiment at Begin Experiment. You have to wait until after the counterbalance routine.

---

<div class="post-metadata">

**Author:** ![wendyross](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wendyross](https://discourse.psychopy.org/u/wendyross)\
**Post date:** [November 24, 2024, 4:55pm UTC](https://discourse.psychopy.org/t/new-counterbalance-component-shelf/43057/6 "2024-11-24T16:55:11Z")

</div>

Yes - that was it. Thank you!
