Closed PFython closed 3 years ago
Hi Peter, Unfortunately I'm aware of this problem. It is a bug in Premiere Extend Script API used by pymiere. It only occurs if you use Premiere 2020 meaning if you're using Premiere 2019 this should work find. I reported this issue to Adobe in August hoping for a quick fix but no luck so far (https://community.adobe.com/t5/premiere-pro/extend-script-crash-when-setting-start-end-on-trackitem/td-p/11338656?page=1) I'm going to try a fix within pymiere by catching this error and I will let you know if I suceed.
@PFython I implemented a fix by catching the errors (not ideal but Adobe let me no choice...). You can update the pymiere lib (only the python files, no need to reinstall the extension) and the demo.py script will work properly in Premiere 2020. Let me know if you come accross other issues!
Brilliant and what a fast turnaround, thanks Quentin!
Traceback (most recent call last): File "", line 1, in
File "D:\Pete's Data\OneDrive\Python Scripts\pymiere\demo.py", line 38, in
wrappers.edit_clip(clips[0], start_frame + increment, end_frame + increment, start_frame, end_frame, fps=fps)
File "D:\Pete's Data\OneDrive\Python Scripts\pymiere\pymiere\wrappers.py", line 117, in edit_clip
clip.end = time_from_seconds(end_on_timeline / fps)
File "D:\Pete's Data\OneDrive\Python Scripts\pymiere\pymiere\objects\premiere_objects.py", line 3796, in end
self._eval_on_this_object("end = {}".format(_format_object_to_es(end)))
File "D:\Pete's Data\OneDrive\Python Scripts\pymiere\pymiere\core.py", line 163, in _eval_on_this_object
result = _eval_script_returning_object(line)
File "D:\Pete's Data\OneDrive\Python Scripts\pymiere\pymiere\core.py", line 425, in _eval_script_returning_object
result = eval_script(script, decode_json=True)
File "D:\Pete's Data\OneDrive\Python Scripts\pymiere\pymiere\core.py", line 102, in eval_script
raise ExtendScriptError(response_decoded)
pymiere.core.ExtendScriptError:
TypeError at line 2 : Cannot set property end
1 try{
2 var tmp = $._pymiere['AuH1rqq9hA'].end = $._pymiere['IOtA6VpGyf'];
3 if(typeof tmp === 'object' && tmp !== null){
Line 38 seems to be the problem: wrappers.edit_clip(clips[0], start_frame + increment, end_frame + increment, start_frame, end_frame, fps=fps)
I'm running Windows 10 64 bit, Premiere Pro v14.5.0 (Build 51) (Creative Cloud); Pymiere 1.0 and installed using latest version of ZXP installer.