Csv file not saved

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2021.2.3 1.9.6
Standard Standalone? (y/n) If not then what?: y
What are you trying to achieve?: I want to see csv file after I check some editions in the experiment

What did you try to make it work?: I was receiving csv file when I run locally but it suddenly started not generating it.

What specifically went wrong when you tried that?: No idea. When I check few trials and ESC, it was generating csv before but now it gives the following error:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\data\experiment.py”, line 392, in saveAsPickle
pickle.dump(self, f)
TypeError: can’t pickle weakref objects

Are you trying to save any data that isn’t text or numbers?

I guess i mistakenly included variables as data