Bug 2015428 - hp-toolbox crashes due Python3.10 changes
Summary: hp-toolbox crashes due Python3.10 changes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 35
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-19 07:40 UTC by Ivan Molodetskikh
Modified: 2021-11-04 01:33 UTC (History)
4 users (show)

Fixed In Version: hplip-3.21.2-13.fc35 hplip-3.21.2-13.fc33 hplip-3.21.2-13.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-02 01:04:27 UTC
Type: Bug


Attachments (Terms of Use)

Description Ivan Molodetskikh 2021-10-19 07:40:56 UTC
Description of problem:
hp-toolbox crashes when trying to do certain things.

Version-Release number of selected component (if applicable):
hplip-gui-3.21.2-11.fc35.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Open hp-toolbox
2. Click on "Clean Printheads"

Actual results:
\Traceback (most recent call last):
  File "/usr/share/hplip/ui5/devmgr5.py", line 1270, in ActionsList_clicked
    if item.cmd and isinstance(item.cmd, collections.Callable):
AttributeError: module 'collections' has no attribute 'Callable'
Aborted (core dumped)

Expected results:
It opens hp-clean.

Steps to Reproduce:
1. Open hp-toolbox
2. Click on "Supplies"

Actual results:
\Traceback (most recent call last):
  File "/usr/share/hplip/ui5/devmgr5.py", line 567, in Tabs_currentChanged
    self.TabIndex[tab]()
  File "/usr/share/hplip/ui5/devmgr5.py", line 1575, in updateSuppliesTab
    level_pixmap = self.createStatusLevelGraphic(agent_level, agent_type)
  File "/usr/share/hplip/ui5/devmgr5.py", line 1706, in createStatusLevelGraphic
    pp.fillRect(0, 0, fw, h, QBrush(QColor(map[0])))
TypeError: arguments did not match any overloaded call:
  fillRect(self, QRectF, Union[QBrush, QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'int'
  fillRect(self, QRect, Union[QBrush, QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'int'
  fillRect(self, int, int, int, int, Union[QBrush, QColor, Qt.GlobalColor, QGradient]): argument 3 has unexpected type 'float'
  fillRect(self, QRectF, Union[QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'int'
  fillRect(self, QRect, Union[QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'int'
  fillRect(self, int, int, int, int, Union[QColor, Qt.GlobalColor, QGradient]): argument 3 has unexpected type 'float'
  fillRect(self, int, int, int, int, Qt.GlobalColor): argument 3 has unexpected type 'float'
  fillRect(self, QRect, Qt.GlobalColor): argument 1 has unexpected type 'int'
  fillRect(self, QRectF, Qt.GlobalColor): argument 1 has unexpected type 'int'
  fillRect(self, int, int, int, int, Qt.BrushStyle): argument 3 has unexpected type 'float'
  fillRect(self, QRect, Qt.BrushStyle): argument 1 has unexpected type 'int'
  fillRect(self, QRectF, Qt.BrushStyle): argument 1 has unexpected type 'int'
  fillRect(self, int, int, int, int, QGradient.Preset): argument 3 has unexpected type 'float'
  fillRect(self, QRect, QGradient.Preset): argument 1 has unexpected type 'int'
  fillRect(self, QRectF, QGradient.Preset): argument 1 has unexpected type 'int'
Aborted (core dumped)

Expected results:
It opens the supplies tab.

I'm running this on Fedora 35 Silverblue in an F35 toolbox.

Comment 1 Zdenek Dohnal 2021-10-25 11:57:32 UTC
Hi Ivan,

thank you for reporting the issue!

Both issues are due Python 3.10 changes.

The former traceback is because 'Callable' is now under one more class, 'abc', so the correct call is now  'collections.abc.Callable'.

The latter is due Python3.10 stopped doing implicit format conversions to formats which can cause data loses (usually conversions from bigger formats to smaller - float -> int).

Would you mind trying the rpms from the scratch build and see if it helps? https://koji.fedoraproject.org/koji/taskinfo?taskID=77793063

Comment 2 Ivan Molodetskikh 2021-10-25 14:33:21 UTC
That build seems to work, thanks.

Comment 3 Fedora Update System 2021-10-26 12:39:56 UTC
FEDORA-2021-d068beec13 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-d068beec13

Comment 4 Fedora Update System 2021-10-26 13:14:42 UTC
FEDORA-2021-e985cbc01b has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-e985cbc01b

Comment 5 Fedora Update System 2021-10-26 13:47:31 UTC
FEDORA-2021-40a2896b2a has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-40a2896b2a

Comment 6 Fedora Update System 2021-10-26 15:43:33 UTC
FEDORA-2021-d068beec13 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-d068beec13`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-d068beec13

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2021-10-27 02:07:30 UTC
FEDORA-2021-40a2896b2a has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-40a2896b2a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-40a2896b2a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2021-10-27 02:29:00 UTC
FEDORA-2021-e985cbc01b has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-e985cbc01b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-e985cbc01b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2021-11-02 01:04:27 UTC
FEDORA-2021-d068beec13 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2021-11-04 01:23:18 UTC
FEDORA-2021-40a2896b2a has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2021-11-04 01:33:27 UTC
FEDORA-2021-e985cbc01b has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.