SoapAdapter / expected str instance, byte found
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 763
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
when trying to connect to a remote hosted vcenter v5.1 (OVH - European host which provides virtual VMWare farm) with pyvmomi (latest github dev version or release) with python 3.4 on windows 8.1 64, I get an exception :
msg = 'sequence item 0: expected str instance, bytes found',
File "d:\temp\pyvmomi-master\pyVmomi\SoapAdapter.py", line 1116, in read
The fix is quick
inflatedChunk = self.unzip.decompress(chunk)
will work better with :
inflatedChunk = self.unzip.decompress(chunk).decode('utf-8')
With that 'patch' I can connect and have a sample working (of course I had to struggle with the infamous SSL context bug before).
Then I got other errors, and suddenly I wonder if this lib is really compatible with python 3, and if I ever should trust such a buggy piece of software to interact with production servers ...
Anyone else got those bugs ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The reported failure is in pyVmomi/SoapAdapter.py at line 1116; start by reproducing the Python 3.4 connection path and inspecting how read() handles decompressed chunks. Done means the reported bytes-versus-str exception no longer occurs during the vCenter connection, with the behavior checked against a focused regression test or reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100