I am currently working on a script where within a function, key-value pairs are being added to a dictionary x
- consider x
as a single dictionary of different inputs used to query data, and different key-values are appended to this depending on certain conditions being fulfilled.
However, when I load in the script into my session with some new assignment logic added, I am hitting a 'constants
error. This is despite all assignments being kept to this dictionary x
. When these two new assignments within x
are commented out, the script will load in successfully.
I know the 'constants
error usually refers to the max number of constants within a certain scope being exceeded, but surely this shouldn't be happening when all assignment is happening within this dictionary x
. Is there a way to get around this? What is causing this issue?