Jump to content
Forums in Read-Only Mode - Please use Reddit ×
  • 0

[Solved] revdep-rebuild fails with UnicodeDecodeError


McQ

Question

When I run revdep-rebuild it fails with this output:

# revdep-rebuild –v
 * This is the new python coded version
 * Please report any bugs found using it.
 * The original revdep-rebuild script is installed as revdep-rebuild.sh
 * Please file bugs at: https://bugs.gentoo.org/
 * Collecting system binaries and libraries
 * Checking dynamic linking consistency
 * Assign files to packages
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/revdep-rebuild", line 40, in <module>
    success = rebuild.main(rebuild.parse_options())
  File "/usr/lib64/python2.7/site-packages/gentoolkit/revdep_rebuild/rebuild.py", line 171, in main
    success = rebuild(logger, assigned, settings)
  File "/usr/lib64/python2.7/site-packages/gentoolkit/revdep_rebuild/rebuild.py", line 90, in rebuild
    ' --oneshot --complete-graph=y ' +
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1: ordinal not in range(128)

 

I verified the locale is set to en_US.utf8

# eselect locale list
Available targets for the LANG variable:
  [1]   C
  [2]   POSIX
  [3]   en_US
  [4]   en_US.iso88591
  [5]   en_US.utf8 *
  [ ]   (free form)
# locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE=POSIX
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

 

But for some reason I get this output from python which is showing ascii:

# python
Python 2.7.13 (default, Jul 26 2017, 07:27:56) 
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> reload(sys)
<module 'sys' (built-in)>
>>> sys.getdefaultencoding()
'ascii'
>>> 

Can you suggest what setting that I need to repair?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
17 hours ago, jhan said:

Could be a problem with the script itself. You are using python 2.7.13 and you get the error. I'm using python 3.5.3 and no error. And in the line 90 of 


/usr/lib64/python3.5/site-packages/gentoolkit/revdep_rebuild/rebuild.py

I see nothing problematic:


88	logger.warning(yellow(
89		'\nemerge') + args +
90		' --oneshot --complete-graph=y ' +
91		bold(emerge_command))

Could you post the according lines of the file /usr/lib64/python2.7/site-packages/gentoolkit/revdep_rebuild/rebuild.py ?

Lines 88-91:

logger.warning(yellow(
		'\nemerge') + args +
		' --oneshot --complete-graph=y ' +
		bold(emerge_command))

Lines 171-173:

success = rebuild(logger, assigned, settings)
	logger.debug("rebuild return code = %i" %success)
	return success

 

Link to comment
Share on other sites

  • 0

I used eselect to choose python 3.4 as the active interpretor and no longer get the  UnicodeDecodeError. 

However, there is another issue:

# revdep-rebuild –v
* This is the new python coded version
 * Please report any bugs found using it.
 * The original revdep-rebuild script is installed as revdep-rebuild.sh
 * Please file bugs at: https://bugs.gentoo.org/
 * Checking dynamic linking consistency
 * Assign files to packages

emerge –v --oneshot --complete-graph=y net-fs/samba:0
!!! '–v' is not a valid package atom.
!!! Please check ebuild(5) for full details.

 

Link to comment
Share on other sites

  • 0
10 hours ago, jhan said:

I get the same error when I copy your command. But when you make the dash in front of the v a dash, it works. See the difference?


emerge –v --oneshot --complete-graph=y net-fs/samba:0

emerge -v --oneshot --complete-graph=y net-fs/samba:0

 

OMG! Thanks so much for catching that ---- and to think how often I stared at that "dash"  (-:

Link to comment
Share on other sites

×
×
  • Create New...