iluvcapra/py-ptsl

[BUG]

Closed this issue · 3 comments

Describe the bug
get_timeline_selection is not working. I get this error:

function get_timeline_selection in engine.py at line 947

response = self.client.run(op)
function run in client.py at line 161
raise CommandError(command_errors.errors)

function get_timeline_selection in engine.py at line 947
response = self.client.run(op)
function run in client.py at line 161
raise CommandError(command_errors.errors)

To Reproduce
Please enter code here that demonstrates the bug:

import sys
import datetime
import math

from ptsl import open_engine
from ptsl import PTSL_pb2 as pt

with open_engine(company_name="py-ptsl",
                 application_name=sys.argv[0]) as engine:
    
    selection = engine.get_timeline_selection()
    print(selection)

Expected behavior
Return of Timeline Selection

Platform:

  • Operating System: macOS 12.7.4
  • Pro Tools Version: 2023.12

Additional context
I tried changing

def get_timeline_selection(self) -> Tuple[str, str]:
            """
            Returns data about the current timeline selection.
            :returns: a Tuple of the In and Out time.
            """
            op = ops.GetMemoryLocations()
            response = self.client.run(op)
            return (response.in_time, ops.response.out_time)

to

def get_timeline_selection(self) -> Tuple[str, str]:
            """
            Returns data about the current timeline selection.
            :returns: a Tuple of the In and Out time.
            """
            op = ops.GetTimelineSelection()
            response = self.client.run(op)
            return (response.in_time, ops.response.out_time)

but just get no return value.

Do you mind posting the stderr message you get?

I figured it out, this was a typo in the engine source, it's fixed on master.

thanks!