# Can I pass a circle-reference Error with a "Try"Statement?

**URL:** <https://forum.dynamobim.com/t/can-i-pass-a-circle-reference-error-with-a-try-statement/78587>\
**Category:** Developers\
**Created:** [July 12, 2022, 1:46pm UTC](https://forum.dynamobim.com/t/can-i-pass-a-circle-reference-error-with-a-try-statement/78587 "2022-07-12T13:46:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [July 12, 2022, 1:46pm UTC](https://forum.dynamobim.com/t/can-i-pass-a-circle-reference-error-with-a-try-statement/78587/1 "2022-07-12T13:46:47Z")

</div>

![2022-07-12_15h40_21](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/e/2e6ac8768e0826257a6cdfefdee82fcd38bf64ca.png)

 ![2022-07-12_15h40_45](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/2/a28323b456ac3c8134ec1e14be4694b171546f1c.png)  
Hello,

How can i ignore this error.

My script just sets Workset to the correct Element…  
It stopps at this Error(Warning)… how can i “ignore” it?

finaly what is a circle-reference? how do i (accidently) generate it?

> **[Python Try Except](https://www.w3schools.com/python/python_try_except.asp)**
>
> W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

KR

Andreas

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [July 12, 2022, 2:59pm UTC](https://forum.dynamobim.com/t/can-i-pass-a-circle-reference-error-with-a-try-statement/78587/2 "2022-07-12T14:59:02Z")

</div>

Would you mind translating the error to English? I think I know the one you’re mentioning but I’d like to be sure. Could you also show the rest of your graph (with node previews)?

A circular reference is one where a reference object eventually (if not immediately) refers back to the original object that was referencing it. A loop gets created where Object A can’t change because it’s referencing a value from Object B that’s already referencing the value from Object A.

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [July 12, 2022, 3:07pm UTC](https://forum.dynamobim.com/t/can-i-pass-a-circle-reference-error-with-a-try-statement/78587/3 "2022-07-12T15:07:23Z")

</div>

![2022-07-12_17h07_10](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/8/98d3f680fee71d77f7d5fc58fe4be28625299212.png)

 ![2022-07-12_17h09_41](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/3/633246644b8d11a5afc05a09c8607b11ec7e71c8.png)

the script itself has no warning!

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [July 12, 2022, 4:06pm UTC](https://forum.dynamobim.com/t/can-i-pass-a-circle-reference-error-with-a-try-statement/78587/4 "2022-07-12T16:06:49Z")

</div>

I’d take a closer look at those two Wall elements. It’s possible that the circular reference already exists and your graph is merely raising the warning again.

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [July 12, 2022, 7:49pm UTC](https://forum.dynamobim.com/t/can-i-pass-a-circle-reference-error-with-a-try-statement/78587/5 "2022-07-12T19:49:56Z")

</div>

@Nick_Boyts ,

the warning happened in all models that i tested… i will check it. the instances itself.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [July 12, 2022, 8:11pm UTC](https://forum.dynamobim.com/t/can-i-pass-a-circle-reference-error-with-a-try-statement/78587/6 "2022-07-12T20:11:42Z")

</div>

It could be related to sub-components of certain elements, like compound Walls, but I would have expected read-only style errors instead of circular references.

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [July 12, 2022, 8:12pm UTC](https://forum.dynamobim.com/t/can-i-pass-a-circle-reference-error-with-a-try-statement/78587/7 "2022-07-12T20:12:55Z")

</div>

@Nick_Boyts ,

it is a revit issue and not a dynamo issue… …so i am unable to “pass” this error?

i have around 1500 walls in the project and these 2 Walls block the whole process 😕

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [July 12, 2022, 8:24pm UTC](https://forum.dynamobim.com/t/can-i-pass-a-circle-reference-error-with-a-try-statement/78587/8 "2022-07-12T20:24:25Z")

</div>

You likely won’t be able to interact with the error window, no. But if you can determine what the actual issue is that’s causing the circular reference then you could check for it in your graph.
