I have been working on a script for a few months to perfect a scrip to append one dataset to another when they may or may not have the same variables, and these variables may or may not have conflicting metadata. My progress thus far is here:
While I cannot post the two datasets in question, I can say that each is 2500 cases in length and has 1000 or so variables.
Now to the point– when looping through variables in the `init` method defined in the gist above, the code throws `SystemError: error return without exception set`. Upon further investigation, I found that the error was in the variable itself– the variables `i` and `j`, which I am using to denote the iteration of variables within the two sets within the `init` method, appear to exist– within the VariableList in the datasets, there are pointers to them, and they have memory addresses– when I or the program attempt to get any information on them (such as the name field) it crashes the program. Not even the debugger can peer inside them, attempting to do so crashes the debugger (meaning, in the context of PyCharm, the connection to the debugger is aborted and all session information is lost).
Attached is an image containing the memory addresses of the two “phantom variables” and (more relevantly) the stack trace. I verified that there is a variable at index 27 in both datasets, and that its format is python-friendly.
The error thrown seems to be a NameError, which I have attached debug information on. Any pointers on what to do here?