Bug 1704871 - TypeError: 'SwigPyObject' object is not iterable
Summary: TypeError: 'SwigPyObject' object is not iterable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libdnf
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-30 17:30 UTC by Brian Lane
Modified: 2019-07-30 01:14 UTC (History)
8 users (show)

Fixed In Version: libdnf-0.35.1-2.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-30 01:14:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Brian Lane 2019-04-30 17:30:51 UTC
I'm trying to add module support to lorax-composer, using libdnf via dnf and python.

After I grab the list of modules with:
modules = dbo._moduleContainer.getModulePackages()
latest = dbo._moduleContainer.getLatestModulesPerRepo(STATE_UNKNOWN, modules)

And digging down to the module object I call some of the ModulePackage methods to get details about it.

I can't seem to get python to iterate the result of getModuleDependencies() called on the ModulePackage object. Other methods work just fine.

This one returns:

<Swig Object of type 'std::vector< libdnf::ModuleDependencies,std::allocator< libdnf::ModuleDependencies > > *' at 0x7fd1eb699930> 

But there doesn't seem to be any way to use it in from python.

Note, I've also filed a GH issue for this at - https://github.com/rpm-software-management/libdnf/issues/718

Comment 1 Jaroslav Mracek 2019-05-03 15:21:23 UTC
I created a patch that allows to work with std::vector< libdnf::ModuleDependencies> (https://github.com/rpm-software-management/libdnf/pull/726). Thank you very much for your report.

Comment 2 Fedora Update System 2019-07-04 13:50:18 UTC
FEDORA-2019-58c2d3f1aa has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-58c2d3f1aa

Comment 3 Fedora Update System 2019-07-05 00:45:52 UTC
dnf-4.2.7-1.fc30, libdnf-0.35.1-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-58c2d3f1aa

Comment 4 Fedora Update System 2019-07-23 07:21:13 UTC
FEDORA-2019-672a74d688 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-672a74d688

Comment 5 Fedora Update System 2019-07-24 01:44:11 UTC
dnf-4.2.7-2.fc30, libdnf-0.35.1-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-672a74d688

Comment 6 Fedora Update System 2019-07-30 01:14:42 UTC
dnf-4.2.7-2.fc30, libdnf-0.35.1-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, 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.