@p1r4t3b0y wrote:
Hi folks,
I’m running into a problem with a Python script that I’m currently working on, where after a couple of iterations, it exceeds the recursion limit somehow!?
By iterations, I mean that the component refreshes/recomputes, much like a Timer, and stores essential information, as a class object in the sticky dictionary.
Inside the class, I have a nested list, but instead of sublists, it contains dictionaries, and the error occurs here, when I try to check if a certain dictionary is included in this list.Example:
test_dict = {"x": 0, "y": 2} nest_list = [{"x": 0, "y": 0}, {"x": 0, "y": 1}, {"x": 0, "y": 2}, {"x": 1, "y": 0}, ...] if test_dict in nested_list: # recursion error pass
In the script, I don’t do any kind of recursion myself, so I guess that it is used by the inclusion test?
I’ve tried raising the recursion limit, even setting the depth to hundreds of millions, but the error still occurs.
import sys sys.setrecursionlimit(100000000)
Is this done differently in GHPython or possible at all?
I can’t currently show the script, since it’s work related and thus confidential.
Any ideas? Thanks.
Posts: 5
Participants: 4