'Python subprocess returning exception

I have the following code that has been working until recently:

        si = STARTUPINFO()
        si.dwFlags |= STARTF_USESHOWWINDOW
        env = environ
        self.popen = Popen('python', [path + '\opt_module_v3.py'] + vlist, stdout=PIPE, stderr=STDOUT, stdin=PIPE, universal_newlines=True, bufsize=1, startupinfo=si, env=env)
        lines_iterator = iter(self.popen.stdout.readline, b"")

it calls the opt_module_v3.py and returns messages as the child process runs. When I run the main code, I'm getting the following exception:

   self.popen = Popen('python', [path + '\opt_module_v3.py'] + vlist, stdout=PIPE, 
stderr=STDOUT, stdin=PIPE, universal_newlines=True, bufsize=1, startupinfo=si, env=env)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", 
line 108, in __init__
super(SubprocessPopen, self).__init__(*args, **kwargs)
TypeError: __init__() got multiple values for argument 'bufsize'

Like I mentioned, this code was working before but I might have stuffed up since I've been working on improvements. Any clues on what could be happening here?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source