ha-hpprinter
ha-hpprinter copied to clipboard
Error: string indices must be integers, Line: 222
Hi there,
First of all, thanks for this custom component! Been using it for two days now and it works like a charm. On the down side, my logs ar getting a bit spammed with error messages like:
Logger: custom_components.hpprinter.api.HPPrinterAPI
Source: custom_components/hpprinter/api/HPPrinterAPI.py:100
Integration: HP Printer ([documentation](https://github.com/elad-bar/ha-hpprinter), [issues](https://github.com/elad-bar/ha-hpprinter/issues))
First occurred: 11:18:43 (40 occurrences)
Last logged: 11:57:43
Failed to extract from array AlertDetailsMarkerColor of ['Black', 'Magenta', 'Yellow', 'Cyan'], Error: string indices must be integers, Line: 222
System specs: Home Assistant 2023.4.6: 2023.4.6 Supervisor: 2023.04.1 Operating System 10.1 Frontend-versie: 20230411.1 - latest Printer: HP Color LaserJet Pro MFP M177fw
Same printer, exact same problem. Here is a dump of the ProductStatusDyn.xml:
<!--
THIS DATA SUBJECT TO DISCLAIMER(S) INCLUDED WITH THE PRODUCT OF ORIGIN.
-->
<psdyn:ProductStatusDyn xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dd="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/" xmlns:ad="http://www.hp.com/schemas/imaging/con/ledm/alertdetails/2007/10/31" xmlns:pscat="http://www.hp.com/schemas/imaging/con/ledm/productstatuscategories/2007/10/31" xmlns:locid="http://www.hp.com/schemas/imaging/con/ledm/localizationids/2007/10/31" xmlns:psdyn="http://www.hp.com/schemas/imaging/con/ledm/productstatusdyn/2007/10/31" xsi:schemaLocation="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/ ../../schemas/dd/DataDictionaryMasterLEDM.xsd http://www.hp.com/schemas/imaging/con/ledm/alertdetails/2007/10/31 ../../schemas/AlertDetails.xsd http://www.hp.com/schemas/imaging/con/ledm/productstatuscategories/2007/10/31 ../../schemas/ProductStatusCategories.xsd http://www.hp.com/schemas/imaging/con/ledm/localizationids/2007/10/31 ../../schemas/LocalizationIds.xsd http://www.hp.com/schemas/imaging/con/ledm/productstatusdyn/2007/10/31 ../../schemas/ProductStatusDyn.xsd">
<dd:Version>
<dd:Revision>216</dd:Revision>
</dd:Version>
<psdyn:Status>
<pscat:StatusCategory>inPowerSave</pscat:StatusCategory>
</psdyn:Status>
<psdyn:AlertTable>
<dd:ModificationNumber>17</dd:ModificationNumber>
<psdyn:Alert>
<ad:ProductStatusAlertID>genuineHP</ad:ProductStatusAlertID>
<dd:SequenceNumber>12</dd:SequenceNumber>
<ad:Severity>Info</ad:Severity>
<ad:AlertDetails>
<ad:AlertDetailsMarkerColor>Black</ad:AlertDetailsMarkerColor>
<ad:AlertDetailsMarkerColor>Magenta</ad:AlertDetailsMarkerColor>
<ad:AlertDetailsMarkerColor>Yellow</ad:AlertDetailsMarkerColor>
<ad:AlertDetailsMarkerColor>Cyan</ad:AlertDetailsMarkerColor>
<ad:AlertDetailsConsumableTypeEnum>toner</ad:AlertDetailsConsumableTypeEnum>
<ad:AlertDetailsUserAction>acknowledgeConsumableState</ad:AlertDetailsUserAction>
</ad:AlertDetails>
<dd:ResourceURI>/DevMgmt/ConsumableConfigDyn.xml</dd:ResourceURI>
<dd:ResourceType>ledm:hpLedmConsumableConfigDyn</dd:ResourceType>
</psdyn:Alert>
</psdyn:AlertTable>
</psdyn:ProductStatusDyn>
@elad-bar, is this project still active?
Yes, but don't have time too much, will try to get to it later this week
Yes, but don't have time too much, will try to get to it later this week
Hi there,
@elad-bar Did you manage to find some time to look at this? :) CC does still work but is also spamming the logs.
Is it still relevant?
Thanks
Is it still relevant?
Thanks
With the older version yes, newer version going to test this week when HA releases it's new version (not testing beta). Did you fix anything to address this problem in your new version?
Last release that was for bug fixing was in end of May (1.0.8), I'm working on v2 for the integration, I'm trying to understand which issues are relevant
Last release that was for bug fixing was in end of May (1.0.8),
I'm working on v2 for the integration, I'm trying to understand which issues are relevant
Alright. Will test your newest version and HA's new version tomorrow and will report back to you.
Just installed HA Core 2024.1.0 and your latest release 1.0.12. The same error is still present:
Failed to extract from array AlertDetailsMarkerColor of ['Black', 'Magenta', 'Yellow', 'Cyan'], Error: string indices must be integers, not 'str', Line: 222
Can I provide you with detailed or debug logs?
@elad-bar, this error is also in effect with the v2.0.0b4 release. Can you take a look? Can I provide you with extra log files?
@AbeltjeNL can you pls provide logs for that issue from v2.0.0b9, in addition, pls provide also diagnostic file.
thanks
is it still relevant with v2?
thanks
is it still relevant with v2?
thanks
This problem is fixed in v2. Keep up the good work!