Page MenuHomePhabricator

jstart - TypeError: memoryview: str object does not have the buffer interface
Closed, ResolvedPublic

Description

When attempting to submit a job using jstart, I get the error below.

Traceback (most recent call last):
  File "/usr/bin/jstart", line 662, in <module>
    main()
  File "/usr/bin/jstart", line 654, in main
    (out, err) = proc.communicate(qsub_stdin)
  File "/usr/lib/python3.4/subprocess.py", line 960, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "/usr/lib/python3.4/subprocess.py", line 1602, in _communicate
    input_view = memoryview(self._input)
TypeError: memoryview: str object does not have the buffer interface

Event Timeline

Change 382726 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[labs/toollabs@master] jstart: Convert stdin from string to bytes

https://gerrit.wikimedia.org/r/382726

bd808 triaged this task as Unbreak Now! priority.
Restricted Application added subscribers: Liuxinyu970226, Jay8g, TerraCodes. · View Herald Transcript

Change 382726 merged by jenkins-bot:
[labs/toollabs@master] jstart: Convert stdin from string to bytes

https://gerrit.wikimedia.org/r/382726

This was caused by rLTOL6a65130c50d4: Port /usr/bin/job to Python3. I neglected to test the jstart/jsub -continuous code path after converting to Python3.