You'll need to do the ReadLine() just once in each iteration of the loop so that you don't get the P1 from one line pairing with the P2 from the next line, something like this:

set file=##class(%Stream.FileCharacter).%New()

do file.LinkToFile("c:\location of csv")

for  quit:file.AtEnd  set line=file.ReadLine() set ^GLOBAL($piece(line,",",1),$piece(line,",",*))=""
 

Or

USER>k temp  set $LIST(temp,31)="",myVar=$LISTTOSTRING(temp,"=?",1)
USER>w myVar
=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?
 

You mentioned that you ran setup.py, but you are running Python version 3.6.0.

I believe setup.py is the install for Python 2. Have you also tried running setup3.py? i.e.

  • python3 setup3.py install