-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
string index exception in tomof of CIMInstance #1312
Comments
Just saw my previous comment got transmogrified by the edit window. A quoted version of the xml is...
|
I had a look into this, and from analyzing the code, I suspect the exception is raised when processing the |
Also, the issue was not found in our tests because the testcase for empty array was missing. I will add one. (Shame on us, but this part of the tests was still in front of us to be made complete, so we would have gotten to it at some point). |
@dugganj Please let me know which version of pywbem you are using. If you want to test the fixes, you can install any of the two pywbem branches that have the fix as described in the installation section of the pywbem docs. |
I have checked for further occurrences of this error, and it also occurs for |
0.12.3
jpd
From: Andreas Maier <notifications@github.com>
Sent: Friday, July 20, 2018 4:03 AM
To: pywbem/pywbem <pywbem@noreply.github.com>
Cc: Jerry Duggan <jerry.duggan@savinnovations.com>; Mention <mention@noreply.github.com>
Subject: Re: [pywbem/pywbem] string index exception in tomof of CIMInstance (#1312)
@dugganj<https://github.com/dugganj> Please let me know which version of pywbem you are using.
If you want to test the fixes, you can install any of the two pywbem branches that have the fix as described in the installation section of the pywbem docs.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1312 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AUr1VLbRP-8Yy4YMIXHGPUv-mrl9vq76ks5uIaq_gaJpZM4VW4qz>.
|
@dugganj Jerry, I have merged the two PRs, so if you want to use the 0.12 based version now, use it from branch |
@dugganj Jerry, I just talked with Karl. If you have further issues to bring up, please do so. We can then also put that into the 0.12.4 version. Otherwise, we would release it with just this one fix in. |
I’ll hang loose until you do an official release of 0.12.4.
jpd
From: Andreas Maier <notifications@github.com>
Sent: Friday, July 20, 2018 7:11 AM
To: pywbem/pywbem <pywbem@noreply.github.com>
Cc: Jerry Duggan <jerry.duggan@savinnovations.com>; Mention <mention@noreply.github.com>
Subject: Re: [pywbem/pywbem] string index exception in tomof of CIMInstance (#1312)
@dugganj<https://github.com/dugganj> Jerry, I have merged the two PRs, so if you want to use the 0.12 based version now, use it from branch stable_0.12. We'll release a 0.12.4 version containing the fix, shortly.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1312 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AUr1VA15XvavWXYLv2a2XC50KkVcOb8qks5uIdb0gaJpZM4VW4qz>.
|
I have no further issues to add.
jpd
From: Andreas Maier <notifications@github.com>
Sent: Friday, July 20, 2018 7:22 AM
To: pywbem/pywbem <pywbem@noreply.github.com>
Cc: Jerry Duggan <jerry.duggan@savinnovations.com>; Mention <mention@noreply.github.com>
Subject: Re: [pywbem/pywbem] string index exception in tomof of CIMInstance (#1312)
@dugganj<https://github.com/dugganj> Jerry, I just talked with Karl. If you have further issues to bring up, please do so. We can then also put that into the 0.12.4 version. Otherwise, we would release it with just this one fix in.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1312 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AUr1VE-wtkGY9hETjUlSrGWt_wcoDO2rks5uIdl9gaJpZM4VW4qz>.
|
@dugganj Jerry, I have just released pywbem 0.12.4 to Pypi. Installation via e.g.:
|
Excellent. I’ll check it out later today.
jpd
From: Andreas Maier <notifications@github.com>
Sent: Friday, July 20, 2018 8:37 AM
To: pywbem/pywbem <pywbem@noreply.github.com>
Cc: Jerry Duggan <jerry.duggan@savinnovations.com>; Mention <mention@noreply.github.com>
Subject: Re: [pywbem/pywbem] string index exception in tomof of CIMInstance (#1312)
@dugganj<https://github.com/dugganj> Jerry, I have just released pywbem 0.12.4 to Pypi.
Installation via e.g.:
pip install pywbem --upgrade
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1312 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AUr1VMDH6YqEU1ZapiwdLoFlPw-V_NuQks5uIesVgaJpZM4VW4qz>.
|
CLosing this issue. Please open a new issue in case of any trouble. |
I ran across this problem running pywbem against providers in SNIA's SMI-Lab. When running tomof on the instance named
//10.1.134.184/interop:ECOM_RegisteredProfile.InstanceID="EMC Corporation:DMTF Indications profile:1.0.0"
I got a string index out of range exception. The stack traceback is:
Traceback (most recent call last):
File "C:/Users/dugganj/PycharmProjects/untitled/test1.py", line 41, in basicTest
mof = singleInst.tomof()
File "C:\Miniconda3\lib\site-packages\pywbem\cim_obj.py", line 3374, in tomof
mof.append(p.tomof(True, MOF_INDENT, maxline))
File "C:\Miniconda3\lib\site-packages\pywbem\cim_obj.py", line 5147, in tomof
if val_str[0] != '\n':
IndexError: string index out of range
Interestingly, I was able to run the same instance through to cimxmlstr. The result of doing so is:
<VALUE.INSTANCEWITHPATH>
10.1.134.184
EMC Corporation:DMTF Indications profile:1.0.0
<PROPERTY.ARRAY NAME="ImplementedFeatures" PROPAGATED="false" TYPE="string"/>
2
2
Indications
1.0.0
<PROPERTY.ARRAY NAME="AdvertiseTypes" PROPAGATED="false" TYPE="uint16">
<VALUE.ARRAY/>
</PROPERTY.ARRAY>
<PROPERTY.ARRAY NAME="AdvertiseTypeDescriptions" PROPAGATED="false" TYPE="string">
<VALUE.ARRAY/>
</PROPERTY.ARRAY>
EMC Corporation:DMTF Indications profile:1.0.0
DMTF Indications profile
DMTF Indications profile
DMTF Indications profile
</VALUE.INSTANCEWITHPATH>
The text was updated successfully, but these errors were encountered: