* Generating api docs UNEXPECTED ERROR: 'utf8' codec can't decode bytes in position 589-591: invalid data Use --debug to see trace information. * * ERROR: sys-apps/portage-2.1.4.1 failed. * Call stack: * ebuild.sh, line 46: Called src_compile * environment, line 2465: Called die * The specific snippet of code: * PYTHONPATH="${S}/pym:${PYTHONPATH}" epydoc -o "${WORKDIR}"/api -qqqqq --no-frames --show-imports --name "${PN}" --url "${HOMEPAGE}" ${my_modules} || die "epydoc failed"; * The die message: * epydoc failed using: dev-python/epydoc-3.0.1
This is odd because epydoc-3.0.1 successfully generates the docs here. If you add --debug to the epydoc arguments in the ebuild then it will produce a more useful error message. Of course, you'll have to regenerate the ebuild digest after you edit the ebuild by running: ebuild /usr/portage/sys-apps/portage/portage-2.1.4.1.ebuild digest The traceback may be useful to the epydoc developers if it's a bug that they don't know about yet.
* Generating api docs Traceback (most recent call last): File "/usr/bin/epydoc", line 13, in <module> cli() File "/usr/lib64/python2.5/site-packages/epydoc/cli.py", line 965, in cli main(options, names) File "/usr/lib64/python2.5/site-packages/epydoc/cli.py", line 783, in main write_html(docindex, options) File "/usr/lib64/python2.5/site-packages/epydoc/cli.py", line 823, in write_html html_writer.write(options.target) File "/usr/lib64/python2.5/site-packages/epydoc/docwriter/html.py", line 660, in write name_to_docs) File "/usr/lib64/python2.5/site-packages/epydoc/docwriter/html.py", line 711, in _write write_func(f.write, *args) File "/usr/lib64/python2.5/site-packages/epydoc/docwriter/html.py", line 808, in write_sourcecode self._src_code_tab_width).colorize()) File "/usr/lib64/python2.5/site-packages/epydoc/docwriter/html_colorize.py", line 487, in colorize html = html.decode(coding).encode('ascii', 'xmlcharrefreplace') File "/usr/lib64/python2.5/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 589-591: invalid data
$ emerge --info Portage 2.1.4.1 (default-linux/amd64/2007.0, gcc-4.2.2, glibc-2.7-r1, 2.6.24-gentoo x86_64) ================================================================= System uname: 2.6.24-gentoo x86_64 AMD Athlon(tm) 64 Processor 3500+ Timestamp of tree: Sun, 03 Feb 2008 15:46:01 +0000 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [disabled] app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.4 dev-lang/python: 2.5.1-r5 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.24 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -pipe -fno-strict-aliasing" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/initng/daemon /etc/initng/net /etc/initng/system /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=athlon64 -O2 -pipe -fno-strict-aliasing" DISTDIR="/home/ftp/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y" FEATURES="collision-protect cvs distlocks elog java-strict metadata-transfer multilib-strict sandbox sfperms sign strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/ " LANG="it_IT.UTF-8" LC_ALL="it_IT.UTF-8" LINGUAS="it" PKGDIR="/home/ftp/packages" PORTAGE_COMPRESS="bzip2" PORTAGE_COMPRESS_FLAGS="-9" PORTAGE_RSYNC_EXTRA_OPTS=" --timeout=800 --progress " PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/overlays/portage /usr/local/overlays/initng-portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow 3dnowext 3ds 7zip X a52 aac acl acpi alsa amd64 amr aoss apache2 arts asf audiofile avahi bash-completion berkdb bitmap-fonts bl branding bzip2 cairo cal3d caps ccache cdb cddb cdparanoia cdr cg chroot cli cpudetection cracklib crypt css cups curl custom-cflags dbus devhelp dga directfb disk-partition djvu dmi dovecot-sasl dri dts dv dvd dvdr dvdread emerald encode epydoc erandom esd exif expat extrafilters fame ffmpeg firefox flac fltk foomaticdb fortran gd gdbm ggi gif gimp gimpprint glib glibc-omitfp glitz glut gmp gnokii gnome gnutls gphoto2 gpm graphviz gsm gtk gtkhtml guile hal hbci howl-compat iconv idn ieee1394 imagemagick imlib ipv6 isc isdnlog ithreads java javacomm javascript jbig jce jikes jpeg jpeg2k justify kde kdeenablefinal kdehiddenvisibility kqemu lcms ldap libcaca libnotify linuxthreads-tls lm_sensors logitech-mouse logrotate lzo mad mailwrapper matroska mbox mdb mhash midi mikmod mjpeg mmap mmx mmxext mng motif mozdevelop mp3 mpeg mpm-worker mppe-mppc msn mudflap musepack musicbrainz mysql ncurses nfs nls nptl nptlonly nsplugin numeric nvidia odbc ode offensive ofx ogg ogre on-the-fly-crypt openexr opengl openmp oss pam parport pch pcre pdf perl php png povray ppds pppd pulseaudio python qa qt3 qt3support qt4 quicktime quotes rdesktop readline reflection resolvconf restrict-javascript rtc samba scanner sdl session slang slp smime sndfile snmp speex spell spl sse sse2 ssl startup-notification subversion svg sysfs syslog tcltk tcpd test tetex tga theora threads tidy tiff timidity tk truetype truetype-fonts type1-fonts unicode usb userlocales utempter v4l v4l2 vcd vda vorbis vorbis-psy wma wmf wmp xattr xcomposite xforms xine xinerama xml xorg xpm xprint xscreensaver xv xvid xvmc yv12 zeroconf zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" CAMERAS="canon directory panasonic pccam300" ELIBC="glibc" FOO2ZJS_DEVICES="hp1005" INPUT_DEVICES="mouse evdev keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="nvidia nv" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LDFLAGS, MAKEOPTS
After further investigations it seems that the file with invalid utf-8 character is /usr/lib64/python2.5/site-packages/pysqlite2/dbapi2.py from dev-python/pysqlite-2.4.1 package. epydoc is fixed upstream for ignoring invalid characters: quoting edloper in bug #1893942 on sourceforge: "Fixed in svn revision 1718. (i.e., if your source file lies about the encoding that it uses, epydoc will no longer crash; instead, it will complain and do the best it can do. In the case of generating colorized source code, it will use the 'ignore' option when decoding, i.e., any characters that don't make sense in the declared encoding will be ignored.)"
not portage
*** Bug 264004 has been marked as a duplicate of this bug. ***
*** Bug 263756 has been marked as a duplicate of this bug. ***
As a workaround for the epydoc failure when building docs for sys-apps/portage, you can enable USE=sqlite on dev-lang/python.
It seems to be fixed in dev-python/pysqlite-2.5.5.