iluvcapra / py-ptsl Goto Github PK
View Code? Open in Web Editor NEWNative Python PTSL (Pro Tools Scripting Library) RPC interface
License: BSD 3-Clause "New" or "Revised" License
Native Python PTSL (Pro Tools Scripting Library) RPC interface
License: BSD 3-Clause "New" or "Revised" License
master/current
create_session_builder.py, line 61 - function name "interlaved".
Describe the bug
Finish Engine tests. Add tests for Client.
Error importing session data with import_data
from ptsl import open_engine
with open_engine(company_name="Name", application_name="Default") as eng:
data = eng.import_data(
session_path='session.ptx'
)
data.import_data()
Traceback (most recent call last):
File "/Users/ron/dev/ptsl.py", line 7, in <module>
data.import_data()
File "/Users/ron/dev/.intel_env/lib/python3.11/site-packages/ptsl/builders/import_builder.py", line 133, in import_data
self._engine.client.run(op)
File "/Users/ron/dev/.intel_env/lib/python3.11/site-packages/ptsl/client.py", line 161, in run
raise CommandError(command_errors.errors)
ptsl.errors.CommandError: ErrType 126: PT_InvalidParameter (Unable to complete the command due to an unknown error.)
Platform:
Implement timeouts for initial connection to Pro Tools and for responses. The client should provide reasonable default values for these (the C++ client makes it 5 seconds) and allow for customization.
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:
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.
Describe the bug
CommandError: ErrType 100: PT_UnknownError (VENUE is not connected)
Press any key to continue . . .
To Reproduce
from ptsl import open_engine, errors
company_name = "fugCompany"
application_name = "fug1"
try:
# Open the engine with the specified company and application names
with open_engine(company_name=company_name, application_name=application_name) as engine:
# Get a list of all memory locations
memory_locations = engine.get_memory_locations()
except errors.CommandError as e:
print(f"CommandError: {e}")
except Exception as e:
print(f"An error occurred: {e}")
assert True
Platform:
Operating System: Windows 10 Pro 64-bit
Processor: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (4 CPUs), ~2.2GHz
Memory: 8192MB RAM
ProTools Intro: V2024.3.1
Pyhton 3.12
VS Community 2022
Py-Ptsl Ptsl V1
Additional context
Same error with this code too:
from ptsl import open_engine, errors
company_name = "fugCompany"
application_name = "fug1"
try:
# Open the engine with the specified company and application names
with open_engine(company_name=company_name, application_name=application_name) as engine:
# Retrieve the current timeline selection using the engine object
in_time, out_time = engine.get_timeline_selection()
# Now you can work with the timeline selection times
print("Timeline selection In time:", in_time)
print("Timeline selection Out time:", out_time)
except errors.CommandError as e:
print(f"CommandError: {e}")
except Exception as e:
print(f"An error occurred: {e}")
Describe the bug
Thanks for the work on this!! Having some issues with a few commands, particularly "get_memory_locations".
To Reproduce
Please enter code here that demonstrates the bug:
import sys
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:
markers = engine.get_memory_locations()
print(markers)
Expected behavior
Output of memory location data from open session.
Error Message
Traceback (most recent call last): File "/Users/heardstudio/Desktop/PTSL/py-ptsl-master/examples/memloctext.py", line 11, in <module> markers = engine.get_memory_locations() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/ptsl/engine.py", line 446, in get_memory_locations self.client.run(op) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/ptsl/client.py", line 161, in run raise CommandError(command_errors.errors) ptsl.errors.CommandError: ErrType 100: PT_UnknownError (VENUE is not connected)
Platform:
Additional context
Tested with 2023.12 and 2024.3.1, verified many other commands are working, the included examples and a bunch of other random commands.
Describe the bug
The Engine class uses protobuf enums in its typing, these aren't supported below Python 3.11. See PEP 646.
The Engine class should maybe avoid these type statements or possibly import annotations from __future__
if that would make the code work on earlier versions of Python.
Describe the bug
'select_tracks_by_name' not working
To Reproduce
Please enter code here that demonstrates the bug:
#!/usr/bin/env python3
import sys
import datetime
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:
#engine.select_all_clips_on_track('V')
#engine.select_tracks_by_name('V','SM_Replace')
engine.select_tracks_by_name('V')
Expected behavior
Track is selected.
Platform:
Additional context
Saw this note in the engine file:
TODO: handle pagination request?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.