possible bug with pyvmomi 6, python 3.x and unicode
See original GitHub issueHello,
When trying to modify network configuration of a vm under a vcenter with french locale by defautl, a SOAP error occur only if using python 3 with latest pyvmomi.
It does not append with python 2.7.x, with the same pyvmomi version.
I’m under CentOS 6 and tried with
- Python 3.4 from RedHat SCL : SOAP fault
- Python 3.5 from Miniconda : SOAP fault
- Python 2.7 from CentOS 6 : OK (but with no way to bypass the urrllib3 SSL warning)
- Python 2.7 from Miniconda : OK
The only difference if found between python 2.7 and 3 is, when I do
print(device_change)
is that the network label appears in unicode python 2.7.x
label = u'Adaptateur r\xe9seau 1',
And not with python 3.x
label = 'Adaptateur réseau 1',
You’ll find below the SOAP error.
Tell me If I could help, as we must not be so many with french vcenter 😉.
Regards,
Caught vmodl fault :
Error returned by expat parser: not well-formed (invalid token)
while parsing serialized value of type string
at line 3, column 200
while parsing property "label" of static type string
while parsing serialized DataObject of type vim.Description
at line 3, column 188
while parsing property "deviceInfo" of static type Description
while parsing serialized DataObject of type vim.vm.device.VirtualE1000
at line 3, column 141
while parsing property "device" of static type VirtualDevice
while parsing serialized DataObject of type vim.vm.device.VirtualDeviceSpec
at line 3, column 100
while parsing property "deviceChange" of static type ArrayOfVirtualDeviceConfigSpec
while parsing serialized DataObject of type vim.vm.ConfigSpec
at line 3, column 94
while parsing call information for method ReconfigVM_Task
at line 3, column 14
while parsing SOAP body
at line 3, column 0
while parsing SOAP envelope
at line 2, column 0
while parsing HTTP request for method reconfigure
on object of type vim.VirtualMachine
at line 1, column 0
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to solve UnicodeDecodeError in Python 3.6?
It sounds like your locale is broken and have another bytes->Unicode issue. The thing you did for Python 2.7 is a hack that...
Read more >Missing dependencies in python2-pyvmomi-6.7.3-4.el7
Type: Bug ... Description of problem: Dependencies on python-six and python2-requests are ... Is it possible for you to switch to python3-pyvmomi instead?...
Read more >Issue 19846: Python 3 raises Unicode errors with the C locale
msg204849 ‑ (view) Author: (Sworddragon) Date: 2013‑11‑30 21:40
msg204850 ‑ (view) Author: R. David Murray (r.david.murray) * Date: 2013‑11‑30 21:53
msg204852 ‑ (view) Author: STINNER...
Read more >pyvmomi · PyPI
pyVmomi is the Python SDK for the VMware vSphere API that allows you to manage ESX, ESXi, and vCenter. Getting Started. To get...
Read more >Details of package python3-pyvmomi in buster
x. pyVmomi is the Python SDK for the VMware vSphere API that allows you to automate actions on VMware ESX, ESXi, and vCenter...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just created a new release: 6.0.0.2016.4. This issue should be fixed.
@lsioctl I think you were on 6.0.0 since the ssoContext is present. The version in setup.py is wrong. I will fix it in coming release.