Copy link to clipboard
Copied
I'm trying to import a sequence using
as described here: https://ppro-scripting.docsforadobe.dev/general/project.html?highlight=import%20sequence#project-imp...
This is what I did:
path = "E:\\folder\\import.prproj"
sequenceIDs = ['sequence-1']
app.project.importSequences(path, sequenceIDs)
TypeError: importSequences() takes 2 positional arguments but 3 were given
Your path variable needs to 'escape' the backslashes; "E:\\path\\untitled.prproj".
Copy link to clipboard
Copied
It looks like you're trying to pass sequence.name, instead of an actual sequence.sequenceid.
You can get the id of a sequence like so:
var templateSequenceID = mytemplateSequence.sequenceid;
Copy link to clipboard
Copied
Thanks for the suggestion.
I tried this as you suggested:
var templateSequenceID = mytemplateSequence.sequenceid
But got this error:
AttributeError: 'Sequence' object has no attribute 'sequenceid'
I also tried:
var templateSequenceID = mytemplateSequence.id
And that gave me:
1
So I tried:
path = "E:\\folder\\import.prproj"
sequenceIDs = [1]
app.project.importSequences(path, sequenceIDs)
But that also gave me the error:
TypeError: importSequences() takes 2 positional arguments but 3 were given
It could be related, so I'm also facing an issue with:
Project.newSequence()
to create a new Sequence object based on the specified preset (.sqpreset file).
Here's what I did:
name = 'Sequence 01'
pathToSequencePreset = "C:\\Path\\Template.sqpreset"
app.project.newSequence(name, pathToSequencePreset)
Here is the error I get:
AttributeError: 'Project' object has no attribute 'newSequence'
Thank you again for any help!
Copy link to clipboard
Copied
I checked the documentation again and fixed the code. Specifically, capitalizing "ID" in Sequence.sequenceID, and I'm now able to get the sequence ID e.g. "2714b58d-10a0-4801-9646-8a4f6f1e2a98".
But, when I use it for Project.importSequence(), I'm still getting the error:
TypeError: importSequences() takes 2 positional arguments but 3 were given
Here is what I tried:
Copy link to clipboard
Copied
I checked the documentation and fixed the code. Specifically, capitalizing "ID" in Sequence.sequenceID. I'm now able to get the sequence ID e.g. ""2714b58d-10a0-4801-9646-8a4f6f1e2a98"
But, when I use it in Project.importSequences(), I'm still getting the TypeError.
Here is what I tried:
Copy link to clipboard
Copied
Your path variable needs to 'escape' the backslashes; "E:\\path\\untitled.prproj".
Copy link to clipboard
Copied
Okay, I've tried that and it still doesn't work.
TypeError: importSequences() takes 2 positional arguments but 3 were given
Seems like I'm the only one facing this issue, as a friend tried it on his machine and was able to make it work.
Copy link to clipboard
Copied
I think those additional 'arguments' are your string, without escaped backslashes...
Copy link to clipboard
Copied
Here's what I did:
app.project.newSequence(name, pathToSequencePreset)
See PProPanel's example code for making a sequence from a preset.