Repeat Report cannot handle Reporters containing strings.
https://github.com/quaquel/pyNetLogo/blob/b944208036c9ef7a9b0b31c8c890a05cdb73f98d/pyNetLogo/core.py#L573-L575
The problem is that the netlogo code here becomes: file-open "folder/count object where [ string = "value"].txt" Meaning netlogo understands:
file-open
"folder/count object where [ string = "
value
"].txt"
Due to netlogo requiring " for strings like file-open, there is no way to get around this by altering the reporter. My recommendation would be to simply remove all " from the variable for the filename.
(Possible: variable.replace('"',''))
To further expand on this, on windows I think it's doesn't like the characters: < > either. I think the file name needs to be changed to avoid any special character that might cause problems.
good point. Indeed, I implicitly assume that variable is some alphanumerical string so this needs fixing. In principle the use of the variable name in the name of the txt file is not needed at all. It can be any random string, as long as I maintain a mapping between the variable name and the associated txt file.