@rtulke I'm an avid user of rpen, and I just recently encountered my first system where python is python3.
Now, I was using an older fork that I re-synced up and I saw that you put python2 in the shebang. Thanks!
But with Python3, the error is:
Traceback (most recent call last):
File "/home/mathomp4/local-SLES11/bin/rpen.py", line 45, in <module>
op = p.communicate(input=op)[0]
File "/discover/swdev/mathomp4/anaconda/2019.10_py3.7/2019-12-17/lib/python3.7/subprocess.py", line 939, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "/discover/swdev/mathomp4/anaconda/2019.10_py3.7/2019-12-17/lib/python3.7/subprocess.py", line 1666, in _communicate
input_view = memoryview(self._input)
TypeError: memoryview: a bytes-like object is required, not 'str'
Now, I can get it to work in Python 3 by adding encoding to all the Popen() calls:
I have been trying to figure out the end of this post: https://stackoverflow.com/a/27775464 which seems like it might have a solution...but I can't get it to work.
@rtulke I'm an avid user of rpen, and I just recently encountered my first system where
python
ispython3
.Now, I was using an older fork that I re-synced up and I saw that you put
python2
in the shebang. Thanks!But with Python3, the error is:
Now, I can get it to work in Python 3 by adding encoding to all the
Popen()
calls:but that doesn't work in Python 2.
I have been trying to figure out the end of this post: https://stackoverflow.com/a/27775464 which seems like it might have a solution...but I can't get it to work.