Bug 1750107

Summary: TypeError: 'Shiboken.ObjectType' object is not iterable
Product: [Fedora] Fedora Reporter: edpil02 <edpil02>
Component: python-pyside2Assignee: Richard Shaw <hobbes1069>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: alexis.jeandet, hobbes1069, johan.heikkila, laurent.rineau__fedora, przemo, rdieter, sopwith, thoiland, tuju
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-pyside2-5.13.2-4.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-23 02:44:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1832312    

Description edpil02 2019-09-08 11:46:15 UTC
I'm trying some Pyside2 browser extensions, but all fails with the same error :
TypeError: 'Shiboken.ObjectType' object is not iterable.
Qt bugtracker doesnt help.

Output browser:

File ".config/falkon/plugins/toolbartools/__init__.py", line 21, in <module>
from toolbartools.Spacer import Spacer
File ".config/falkon/plugins/toolbartools/Spacer.py", line 20, in <module>
class Spacer(QtWidgets.QWidget):
TypeError: 'Shiboken.ObjectType' object is not iterable
Failed to import module "toolbartools"

Thanks

Comment 1 Richard Shaw 2019-09-08 21:59:39 UTC
The obvious part is it appears to be missing a python module called "toolbartools" but I've never heard of it and google isn't returning much. At this point I'm not sure this is a bug in PySide2...

Comment 2 edpil02 2019-09-09 07:03:49 UTC
The author of "toolbartools" wrote me yesterday that the extension works for him (archlinux).

I tried many other extensions from falkon store and always got the same errors : 
TypeError: 'Shiboken.ObjectType' object is not iterable
Failed to import module "foo"

I wonder if it's a python3.8 issue because this error is reported in Bug 1724146: python-pyside2 fails to build with Python 3.8  

#Comment 6
Miro Hrončok 2019-07-08 23:30:51 UTC

Now we get:

[ 26%] Built target QtCore
make[1]: Leaving directory '/builddir/build/BUILD/pyside-setup-everywhere-src-5.12.3/x86_64-linux'
make[2]: Entering directory '/builddir/build/INFO:generate_pyi:Generated: /builddir/build/BUILD/pyside-setup-everywhere-src-5.12.3/x86_64-linux/sources/pyside2/PySide2/QtCore.pyi
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyside-setup-everywhere-src-5.12.3/x86_64-linux/sources/pyside2/PySide2/QtCore.pyi", line 135, in <module>

 ------------->  class QAbstractEventDispatcher(PySide2.QtCore.QObject):
 ------------->  TypeError: 'Shiboken.ObjectType' object is not iterable

  Traceback (most recent call last):
  File "/builddir/build/BUILD/pyside-setup-everywhere-src-5.12.3/sources/pyside2/PySide2/QtCore/../support/generate_pyi.py", line 380, in <module>
    generate_all_pyi(outpath, options=options)
  File "/builddir/build/BUILD/pyside-setup-everywhere-src-5.12.3/sources/pyside2/PySide2/QtCore/../support/generate_pyi.py", line 347, in generate_all_pyi
    step = generate_pyi(import_name, outpath, options)
  File "/builddir/build/BUILD/pyside-setup-everywhere-src-5.12.3/sources/pyside2/PySide2/QtCore/../support/generate_pyi.py", line 287, in generate_pyi
    subprocess.check_output([sys.executable, outfilepath])
  File "/usr/lib64/python3.8/subprocess.py", line 395, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib64/python3.8/subprocess.py", line 487, in run
    raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['/usr/bin/python3', '/builddir/build/BUILD/pyside-setup-everywhere-src-5.12.3/x86_64-linux/sources/pyside2/PySide2/QtCore.pyi']' returned non-zero exit status 1.

And sometimes while rebuilding my browser, got some weird errors with pyside2/python3.8 : (two many arguments in fonction foo) then the build became succcessfull after other trials.

Comment 3 Richard Shaw 2019-09-09 13:08:12 UTC
I don't mind updating the package if there's something actionable for me but I don't know what that would be right now...

So toolbartools is a module you have available locally then?

I'm assuming you've tried importing it manually from the python command line? I would start there if not.

Also, there's a new patch level release but I haven't had time to build it yet but I have no idea if it fixes this or not.

https://code.qt.io/cgit/pyside/pyside-setup.git/tree/dist/changes-5.13.1?h=5.13.1

Comment 4 edpil02 2019-09-09 19:28:26 UTC
Toolbartools is not a simple python module , but a a extension of the kde web browser Falkon named before Qupzilla.

https://store.kde.org/p/1311622/


 Description:

Add spacers and separators to Falkon toolbar.
3 comments
Comments

Please login or register to add a comment
eddy02

22 hours ago
Tried to make your extension work , but always get same errors.

class Separator(QtWidgets.QWidget):
TypeError: 'Shiboken.ObjectType' object is not iterable

class Spacer(QtWidgets.QWidget):
TypeError: 'Shiboken.ObjectType' object is not iterable

Rebuilt falkon ,update pyside2 doesnt help.
Thanks.

Report
C
sgorava

22 hours ago
This does not seems to be related to this plugin.

It works fine for me on Arch with version from repository and also from git.

Can you check if other python extensions can work ?

If it is truly only this one, I do not see in your error message any relation to my code.

shiboken ... shiboken2 ?

Report
eddy02

13 hours ago
Thanks for your reply .
I ve already tried other extensions and got same results.
I have also rebuilt shiboken2 (5.12 , 5.14) but doesnt help.

But just discover that my distro upgrade python3.7 to python 3.8. Pyside2 is built whith a patch.
I m pretty sure that it is a python issue.

Sorry for my english and thanks again.

Comment 5 Richard Shaw 2019-09-15 17:56:40 UTC
I recently build 5.13.1 by accident but you might as well try it. I'm probably going to have to bump the Epoch so I can downgrade everyone to 5.12.5...

Comment 6 edpil02 2019-09-15 19:55:15 UTC
I've already built and test pyside2 git versions with no success.
Tested your 5.13.1 built but same result.

Think it is a python 3.8 / pyside2 compatibility issue , i'll try to file a bug report to python upstream.

Sorry for my english and thanks very much for your job.

Comment 7 Richard Shaw 2019-11-12 03:24:40 UTC
Any change here? I've been fighting other package issues.

Comment 8 edpil02 2019-11-12 10:28:59 UTC
I dropped after other builds try.
But i keep on watching pyside2 bug tracker for python 3.8 issues.

Comment 9 Richard Shaw 2019-11-12 14:00:46 UTC
Is there an upstream but already submitted for this issue?

Comment 10 Toke Høiland-Jørgensen 2019-11-15 11:31:41 UTC
Definitely a Python 3.8+pyside2 issue; I also hit it (and Googling the error message, this report was the only thing that came up):

https://travis-ci.org/tohojo/flent/jobs/611950256

I'll go file an upstream bug if no one else has done so already...

Comment 11 edpil02 2019-11-15 12:28:01 UTC
I haven't file a bug to upstream because it seems that they doesn't support python 3.8 actually.
Read in some pyside2 readme or howto files ->  python <= 3.7.
Regards.

Comment 12 Toke Høiland-Jørgensen 2019-11-15 12:44:55 UTC
Ah. Well, filed anyway: https://bugreports.qt.io/browse/PYSIDE-1140

Comment 13 Elliot Lee 2020-01-20 16:33:10 UTC
Pyside2 v5.14 is out, which reportedly fixes the problem.

Comment 14 Richard Shaw 2020-01-21 00:01:31 UTC
The <major>.<minor> version of the package MUST match the qt version. As Rawhide only has 5.13.x, that solution is not available.

Comment 15 Ben Cotton 2020-02-11 17:31:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 16 Alexis Jeandet 2020-05-05 13:09:25 UTC
Hi,

Any update on this?
Without either a 5.14 qt update or a patch for pyside2 5.13 to support python 3.8, pyside2 will remain broken and unusable.

Comment 17 Rex Dieter 2020-05-05 14:00:10 UTC
This looks like the 5.13 branch upstream fix,
https://codereview.qt-project.org/c/pyside/pyside-setup/+/281812

Looks pretty small too.

Comment 19 Richard Shaw 2020-05-05 14:03:07 UTC
Thanks, I'll take a look. Yeah upgrading to 5.14 wasn't going to happen. Qt5 major updates can be quite painful so are usually only done on rawhide.

Comment 20 Alexis Jeandet 2020-05-05 14:16:37 UTC
Not sure this is a fix, it says "This will avoid the current option of installing 5.13.x wheels on Python 3.8 environments." it seems to just prevent any build with python 3.8.

Comment 21 Richard Shaw 2020-05-06 01:59:11 UTC
I agree, doesn't really look like a "fix".

Comment 22 Johan Heikkila 2020-05-06 19:26:41 UTC
Just thought it worth mentioning that FreeCAD (freecad-0.18.4-6.fc32.x86_64) is also broken due to this. It's actually useless, so shouldn't even be available in the fc32 repo right now (have to use appimage from their web site).

Comment 23 Przemo Firszt 2020-05-07 09:59:35 UTC
FreeCAD problems reported here https://bugzilla.redhat.com/show_bug.cgi?id=1832312
#1832312

Comment 24 Johan Heikkila 2020-05-18 18:29:04 UTC
I took patches from here https://github.com/conda-forge/pyside2-feedstock/tree/master/recipe (0002 and 0003) and rebuilt python-pyside2 (python-pyside2-5.13.2-3.fc32.x86_64) (not sure if 0004 was needed, but used it also). It seems to work fine with the patches.

Comment 25 Johan Heikkila 2020-05-18 18:31:18 UTC
To be more specific, FreeCAD works fine with the mentioned patches.

Comment 26 Richard Shaw 2020-05-18 21:33:33 UTC
Building and testing myself. If all is good I'll try official builds. I'm probably going to have to bump the package Epoch since I tried building 5.14.x.

Comment 27 Fedora Update System 2020-05-19 01:19:50 UTC
FEDORA-2020-10d152f626 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-10d152f626

Comment 28 Richard Shaw 2020-05-19 02:09:36 UTC
Please test and give Karma!

Comment 29 Fedora Update System 2020-05-20 05:48:25 UTC
FEDORA-2020-10d152f626 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-10d152f626`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-10d152f626

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

Comment 30 Fedora Update System 2020-05-23 02:44:41 UTC
FEDORA-2020-10d152f626 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.