# Expected View, Got List, Python Error

**URL:** <https://forum.dynamobim.com/t/expected-view-got-list-python-error/16426>\
**Category:** Lists-Logic\
**Created:** [November 12, 2017, 8:45pm UTC](https://forum.dynamobim.com/t/expected-view-got-list-python-error/16426 "2017-11-12T20:45:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Archinecture](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/archinecture/32/35589_2.png) [@Archinecture](https://forum.dynamobim.com/u/Archinecture)\
**Post date:** [November 12, 2017, 8:45pm UTC](https://forum.dynamobim.com/t/expected-view-got-list-python-error/16426/1 "2017-11-12T20:45:51Z")

</div>

Hi,

I was trying to replicate the [Create SheetSet from Sheet grouping](http://dynamobim.org/forums/topic/create-sheetset-from-sheet-grouping/) but I got the “Expected View, Got List, Python Error”

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/c/3c2ebf6d0f3308068e7bb9419d9f7a904c071721.PNG)

Could someone help me with creating a loop for the view set, I just don’t know enough Python to figure it out… or is there are node that does this already?

Thanks,

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [November 12, 2017, 9:00pm UTC](https://forum.dynamobim.com/t/expected-view-got-list-python-error/16426/2 "2017-11-12T21:00:48Z")

</div>

There are a couple of links in this post that will help you to get started:

> [@Python Nodes Basics](https://forum.dynamobim.com/t/python-nodes-basics/15872/12):
>
> The following posts are related to PYTHON LISTS:

Could you also paste the code you are working on as preformatted text?

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [November 14, 2017, 1:53pm UTC](https://forum.dynamobim.com/t/expected-view-got-list-python-error/16426/3 "2017-11-14T13:53:48Z")

</div>

Hi Ana,

> [@Archinecture](#):
>
> but I got the “Expected View, Got List, Python Error”

Use Flatten node before feeding views to “Print PDF” and also make sure you add close transaction before you start another transaction:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/d/bd29677566ed87c1018ca42f2227734ec0dc95de.png)  
 ![Set](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/9/19ba2463922a856684145202593f0274ef205d9d.gif)  
And here is DYN file [Create Sheetset (For Ana).dyn](https://forum.dynamobim.com/uploads/short-url/jENndflgWETmIiKeksnwWGw1mz7.dyn) (4.2 KB)
