Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 317775 - sys-apps/portage-2.1.8.3: UnicodeEncodeError in _emerge.depgraph.depgraph.display()
Summary: sys-apps/portage-2.1.8.3: UnicodeEncodeError in _emerge.depgraph.depgraph.dis...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 330805 (view as bug list)
Depends on:
Blocks: 335925
  Show dependency tree
 
Reported: 2010-04-29 13:29 UTC by W. Grunewald
Modified: 2010-09-04 08:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix the UnicodeEncodeError (display-unicode.patch,1.70 KB, patch)
2010-05-06 19:47 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description W. Grunewald 2010-04-29 13:29:01 UTC
Some days ago I synced and emerged world on my text console (because xorg didn't start after upgrading to 1.7). After fixing that I did an emerge -vpDNu world under X11. Now I always get this error:

# emerge -vpDNu world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  NS   ] sys-kernel/gentoo-sources-2.6.32-r7 [2.6.30-r4, 2.6.30-r5, 2.6.31-r6] USE="-build -deblob -symlink" 0 kB [0]
[ebuild     U ] dev-java/sun-jre-bin-1.6.0.20 [1.6.0.19] USE="X alsa -jce -nsplugin -odbc" 0 kB [0]
[ebuild     U ] app-emulation/virtualbox-modules-3.1.6 [3.1.4] 0 kB [0]
[ebuild     U ] sys-fs/lvm2-2.02.63-r2 [2.02.56-r3] USE="lvm1 readline static (-clvm) (-cman) (-selinux)" 0 kB [0]
Traceback (most recent call last):
  File "/usr/bin/emerge", line 42, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1410, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 375, in action_build
    favorites=favorites)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 4637, in display
    out.write("%s\n" % (myprint,))
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 2917: ordinal not in range(128)

My portage version sys-apps/portage-2.1.8.3. I also tried upgrading portage (didn't help).
Comment 1 W. Grunewald 2010-05-06 13:53:08 UTC
I tried to add "--quiet", so that I could at least update my system. This also did not work because --quiet prints a package list anyway:

# emerge --quiet -vDNu world
[ebuild     U ] gnome-base/gnome-common-2.28.0 [2.26.0]
[ebuild     U ] kde-base/kde-env-4.4.3 [4.4.2] USE="(-aqua) (-kdeenablefinal) (-kdeprefix)" 
[ebuild     U ] sys-power/acpid-2.0.4-r2 [1.0.10_p3]
[ebuild  N    ] sys-power/pm-quirks-20100316 
[ebuild   R   ] dev-lang/swig-1.3.40-r1  USE="-ccache -doc (-test%)" 
[ebuild  NS   ] sys-kernel/gentoo-sources-2.6.32-r7 [2.6.30-r4, 2.6.30-r5, 2.6.31-r6] USE="-build -deblob -symlink" 
[ebuild     U ] dev-perl/XML-NamespaceSupport-1.11 [1.09]
[ebuild   R   ] sys-libs/db-4.7.25_p4  USE="-doc -examples% -java -nocxx -tcl -test" 
[ebuild     UD] dev-db/sqlite-3.6.22-r2 [3.6.23.1] USE="fts3 readline secure-delete threadsafe -debug -doc -extensions -icu -soundex -tcl -test" 
[ebuild     U ] media-libs/libart_lgpl-2.3.21-r1 [2.3.20] USE="(-debug%)" 
[ebuild     U ] sys-apps/sg3_utils-1.29 [1.27.20080726]
[ebuild     U ] gnome-base/orbit-2.14.18 [2.14.17] USE="-doc" 
[ebuild     U ] dev-libs/libxml2-2.7.7 [2.7.6] USE="ipv6 python readline -debug -doc -examples -test" 
[ebuild  NS   ] app-text/docbook-xml-dtd-4.5-r1 [4.1.2-r6, 4.2-r2, 4.3-r1, 4.4-r1]
[ebuild     U ] gnome-base/libbonobo-2.24.3 [2.24.1] USE="-debug -doc" 
[ebuild     U ] x11-libs/pango-1.26.2 [1.24.5-r1] USE="X -debug -doc -test" 
[ebuild     U ] app-text/rarian-0.8.1-r1 [0.8.1] USE="-debug" 
[ebuild  N    ] media-plugins/gst-plugins-resindvd-0.10.17 
[ebuild     U ] dev-java/sun-jre-bin-1.6.0.20 [1.6.0.19] USE="X alsa -jce -nsplugin -odbc" 
[ebuild     UD] dev-libs/redland-1.0.10-r1 [1.0.10-r2] USE="berkdb ssl xml -iodbc -mysql -odbc -postgres -sqlite" 
[ebuild     U ] dev-ruby/rubygems-1.3.6-r1 [1.3.6] USE="-doc -server" RUBY_TARGETS="ruby18 -jruby -ree18 (-ruby19)" 
[ebuild   R   ] dev-ruby/rake-0.8.7-r4  USE="-bash-completion -doc -test" RUBY_TARGETS="ruby18 -jruby -ree18% (-ruby19)" 
[ebuild     U ] media-sound/mpg123-1.12.1 [1.9.2] USE="alsa ipv6 sdl sse (-3dnow) (-3dnowext) (-altivec) -jack (-mmx) -nas -oss -portaudio -pulseaudio (-network%*)"                                                                                                                                                      
[ebuild     U ] media-plugins/gst-plugins-meta-0.10-r4 [0.10-r2] USE="X a52 alsa dvd flac mad mpeg ogg vorbis xv -dvb -esd -ffmpeg -lame% -mythtv -oss -pulseaudio% -taglib% -theora"                                                                                                                                     
[ebuild     U ] sys-fs/udev-151-r4 [151-r2] USE="extras -devfs-compat* -old-hd-rules* (-selinux) -test" 
[ebuild     U ] app-emulation/virtualbox-modules-3.1.6 [3.1.4]
[ebuild     U ] sys-fs/lvm2-2.02.64 [2.02.56-r3] USE="lvm1 readline static (-clvm) (-cman) (-selinux)" 
[ebuild     U ] sys-fs/cryptsetup-1.1.1_rc1 [1.1.0] USE="nls -dynamic (-selinux)" 
Traceback (most recent call last):
  File "/usr/bin/emerge", line 42, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1410, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 289, in action_build
    mydepgraph.display_problems()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 4856, in display_problems
    self._display_problems()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 4875, in _display_problems
    self._dynamic_config._unsatisfied_blockers_for_display)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 3941, in _show_unsatisfied_blockers
    self._show_merge_list()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 3938, in _show_merge_list
    self.display(display_list)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 4637, in display
    out.write("%s\n" % (myprint,))
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 2917: ordinal not in range(128)
Comment 2 Sebastian Luther (few) 2010-05-06 14:03:03 UTC
Try without -v.
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-05-06 14:23:13 UTC
What locale do you use?
Can you reproduce this problem with Python 3.1 (after installing Python 3.1 and running `eselect python set python3.1`)?
Comment 4 W. Grunewald 2010-05-06 15:48:31 UTC
(Thank you, Sebastian! At least I'm able to update my system now.)

My locale is de_DE.UTF-8:

# echo $LANG
de_DE.UTF-8
# echo $LC_ALL
de_DE.UTF-8

After installing Python 3.1 I tried it again:

# eselect python list
Available Python interpreters:
  [1]   python2.6
  [2]   python3.1 *
# emerge -vpDNu world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  NS   ] app-text/docbook-xml-dtd-4.5-r1 [4.1.2-r6, 4.2-r2, 4.3-r1, 4.4-r1] 0 kB [0]
[ebuild     U ] x11-libs/pango-1.26.2 [1.24.5-r1] USE="X -debug -doc -test" 0 kB [0]
[ebuild     U ] app-text/rarian-0.8.1-r1 [0.8.1] USE="-debug" 0 kB [0]
[ebuild     U ] dev-java/sun-jre-bin-1.6.0.20 [1.6.0.19] USE="X alsa -jce -nsplugin -odbc" 0 kB [0]
[ebuild     U ] gnome-base/libbonobo-2.24.3 [2.24.1] USE="-debug -doc" 0 kB [0]
[ebuild     U ] dev-ruby/rubygems-1.3.6-r1 [1.3.6] USE="-doc -server" RUBY_TARGETS="ruby18 -jruby -ree18 (-ruby19)" 0 kB [0]
[ebuild  N    ] media-plugins/gst-plugins-resindvd-0.10.17  0 kB [0]
[ebuild     UD] dev-libs/redland-1.0.10-r1 [1.0.10-r2] USE="berkdb ssl xml -iodbc -mysql -odbc -postgres -sqlite" 0 kB [0]
[ebuild   R   ] dev-ruby/rake-0.8.7-r4  USE="-bash-completion -doc -test" RUBY_TARGETS="ruby18 -jruby -ree18% (-ruby19)" 0 kB [0]
[ebuild     U ] media-sound/mpg123-1.12.1 [1.9.2] USE="alsa ipv6 sdl sse (-3dnow) (-3dnowext) (-altivec) -jack (-mmx) -nas -oss -portaudio -pulseaudio (-network%*)" 0 kB [0]                                                                                                                                             
[ebuild     U ] media-plugins/gst-plugins-meta-0.10-r4 [0.10-r2] USE="X a52 alsa dvd flac mad mpeg ogg vorbis xv -dvb -esd -ffmpeg -lame% -mythtv -oss -pulseaudio% -taglib% -theora" 0 kB [0]                                                                                                                            
[ebuild     U ] sys-fs/udev-151-r4 [151-r2] USE="extras -devfs-compat* -old-hd-rules* (-selinux) -test" 0 kB [0]
[ebuild     U ] app-emulation/virtualbox-modules-3.1.6 [3.1.4] 0 kB [0]
[ebuild     U ] sys-fs/lvm2-2.02.64 [2.02.56-r3] USE="lvm1 readline static (-clvm) (-cman) (-selinux)" 0 kB [0]
[ebuild     U ] sys-fs/cryptsetup-1.1.1_rc1 [1.1.0] USE="nls -dynamic (-selinux)" 0 kB [0]
Traceback (most recent call last):
  File "/usr/bin/emerge", line 42, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1410, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 375, in action_build
    favorites=favorites)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 4637, in display
    out.write("%s\n" % (myprint,))
UnicodeEncodeError: 'utf-8' codec can't encode character '\ud90d' in position 3008: surrogates not allowed
Comment 5 Zac Medico gentoo-dev 2010-05-06 19:47:41 UTC
Created attachment 230633 [details, diff]
fix the UnicodeEncodeError

Save as /tmp/display-unicode.patch and apply as follows:

  patch /usr/lib/portage/pym/_emerge/depgraph.py /tmp/display-unicode.patch
Comment 6 Zac Medico gentoo-dev 2010-08-03 03:33:30 UTC
*** Bug 330805 has been marked as a duplicate of this bug. ***
Comment 7 Zac Medico gentoo-dev 2010-08-23 06:21:39 UTC
This is in 2.2_rc68, but I'll leave this bug open until it's in an unmasked version.
Comment 8 Zac Medico gentoo-dev 2010-09-04 08:27:21 UTC
This is fixed in 2.1.9.