# Sequence Get & Set Current Frame

**URL:** <https://discourse.slicer.org/t/sequence-get-set-current-frame/24372>\
**Category:** Development\
**Tags:** sequences\
**Created:** [July 18, 2022, 3:01pm UTC](https://discourse.slicer.org/t/sequence-get-set-current-frame/24372 "2022-07-18T15:01:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![connorh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/connorh/32/79802_2.png) [@connorh](https://discourse.slicer.org/u/connorh)\
**Post date:** [July 18, 2022, 3:01pm UTC](https://discourse.slicer.org/t/sequence-get-set-current-frame/24372/1 "2022-07-18T15:01:10Z")

</div>

I’m trying to get and set the current ‘frame’ (timepoint) of a vtkMRMLSequenceBrowserNode in python.

I can use `browserNode.SelectNextItem(0)` to get the current frame without error, but then following that when playing the sequence using default sequence playback tools, I repeatedly get the error in the python interactor `TypeError: observe_me() takes 0 positional arguments but 2 were given`.

Is there an alternative way to get and set a vtkMRMLSequenceBrowserNode current frame without creating an observer? Or am I doing something else wrong to give me this error?

My sequence browser is observing 2 synchronized sequence nodes (using `sequenceBrowser.AddSynchronizedSequenceNodeID()`), if this matters.

---

<div class="post-metadata">

**Author:** ![connorh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/connorh/32/79802_2.png) [@connorh](https://discourse.slicer.org/u/connorh)\
**Post date:** [July 25, 2022, 4:04pm UTC](https://discourse.slicer.org/t/sequence-get-set-current-frame/24372/2 "2022-07-25T16:04:23Z")

</div>

I was able to get and set the frame/timepoint using the following, and did not get any errors

```auto
#Get current frame
current_frame = browserNode.GetSelectedItemNumber()
#Set frame 
new_frame = 5
browserNode.SetSelectedItemNumber(new_frame)

```
