aux_get() code does not recognise the lack of a package name/version. It fails when trying to look at the ebuild, which is "". This patch cuts off the lookup when mycpv is "". http://gentoo.twobit.net/portage/portage.py-2.0.24-aux_get.diff
Just realized that the SIMPLEST fix is to add 'continue' after the full_package="" line in emerges' search() code... http://gentoo.twobit.net/portage/portage.py-2.0.24-desc.diff The other method won't help other debugging because it might make some problems silent... Might suggest throwing an exception, but the traceback is kinda obvious.
Will be fixed in 2.0.25. Thanks.