0

Robot Framework File

Run Process | python | C:/file/set_rec.py
Open Browser | website.com/
Run some Kewords...

Python file

import sys

sys.setrecursionlimit(5000)

At first my ride code was just:

Open Browser | website.com/
Run some Keywords...

but after the test throw me the error massage: Python maximum recursion depth exceeded I found a solution at stackoverflow how to include .py in Robotframwork but I get the same error massage.

1
  • Your code is running. It looks like it has a bug which causes it to do infinite recursion. The problem isn't with robot, it's with your set_rec.py file. Commented Jun 24, 2021 at 20:38

1 Answer 1

1

Run Process will execute an external process & then close it - that setrecursionlimit() will change it for that python.exe (only), and not affect the process your robot framework runs in.

I'd suggest looking into what's hitting the recursion limit in the first place & fixing it, that's probably a symptom of some more serious issue.
And if you do want to increase it for the python process the framework is running in, you could try with Evaluate (disclaimer - I personally don't know will this work):

Evaluate    sys.setrecursionlimit(5000)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.