I have various automated processes here, and I run all of them using the same sequence. In each I have a series of Ordered Lists which I run using the script. To get the Ordered Lists I use this line:
ordered_lists = self._project.ContainerCollection.Item("Ordered Lists")
And I've never had an error before. Today I tried running a new process and got this error:
pywintypes.com_error: (-2147352567, 'Exception.', (0, 'SASEGScripting', 'Invalid index Ordered Lists.\r\n\r\n\r\n', None, 0, -2147220490), None)
Never ran into this one before and didn't find any documentation regarding it on the internet.
If I try to access the ordered lists using the index of the Ordered List Item, I can access it fine.
Thanks for any help regarding this error.
Solved it. The issue was that the "Ordered Lists" tab on that project was called "0-Ordered Lists" for some reason. I thought that calling ContainerCollection.Item("Ordered Lists") would call some sort of default "Ordered Lists" object, and not the tab that had that name.
Fixed by changing the name of the tab back to "Ordered Lists"
Solved it. The issue was that the "Ordered Lists" tab on that project was called "0-Ordered Lists" for some reason. I thought that calling ContainerCollection.Item("Ordered Lists") would call some sort of default "Ordered Lists" object, and not the tab that had that name.
Fixed by changing the name of the tab back to "Ordered Lists"
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.