How best to loop through folder with files that contain list of AIDs for batch RTR processing #1142
Unanswered
b1tf0rbyt3s
asked this question in
Q&A
Replies: 1 comment
-
If we turn on debugging, do we get more detail when the second file is processed and the
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, what I am trying to do is loop through a number of text files that contain a comma separated list of AIDs and feed that into a variable to use for initiating batch RTR sessions via BatchInitSessions. It works exactly as you would expect with the first run through but then I get a 400 invalid batch ID error when it loops back - "invalid batch ID provided - Status Code: 400" and the batch ID will be empty when printing it to stdout. I get a batch ID when it runs through first time and successfully runs a series of put and runs. But then it will give me the 400 batch error as it loops back through with the next file and there will be no batch ID when it grabs the second file (The text files containing the list of AIDs are retrieved programmatically via API so they are identical).
Not sure what I am doing wrong or how to go about troubleshooting why I get this error. Or if there is a better way to do this?
Update: Loop works if I define the function within the same python file - as opposed to having the function in a separate python file and importing. Just not sure why it works one way and not the other?
Beta Was this translation helpful? Give feedback.
All reactions