Error Message: Could not save cache: write() argument 1 must be unicode, not str This is displayed on only one of my 5 systems. Could be a buffer overrun? hp Desktop # revdep-rebuild * 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 Could not save cache: write() argument 1 must be unicode, not str * Checking dynamic linking consistency Your system is consistent hp Desktop # Reproducible: Always Steps to Reproduce: 1. Run: emerge --update --deep --with-bdeps=y --newuse --backtrack=300 --changed-deps=y --keep-going=y @world -va 2. Run: emerge --depclean 3. Run: revdep-rebuild Actual Results: hp Desktop # revdep-rebuild * 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 Could not save cache: write() argument 1 must be unicode, not str * Checking dynamic linking consistency Your system is consistent hp Desktop # Expected Results: hp Desktop # revdep-rebuild * 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 Your system is consistent hp Desktop #
I have 5 Gentoo systems. Only one shows this error message.
The same case for me: # revdep-rebuild * 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 Could not save cache: write() argument 1 must be unicode, not str * Checking dynamic linking consistency Your system is consistent
This appears to be a python2 vs python3 issue -- if I run the revdep-rebuild script explicitly with python3 (python3 /usr/bin/revdep-rebuild), the error does _not_ appear, but running it normally (presumably thus via /usr/bin/python or python eclass shebang rewriting) or via an explicit python2 spits out this error consistently.
I've also seen: " * Collecting system binaries and libraries Could not save cache: write() argument 1 must be unicode, not str" with gentoolkit-0.3.2-r1 and python2 but not with python3. As suggested in https://bugs.gentoo.org/show_bug.cgi?id=572116, I've tried gentoolkit-0.3.3: # revdep-rebuild -V revdep-rebuild 0.3.3 # python2 /usr/bin/revdep-rebuild -- -p * 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 Your system is consistent # python3 /usr/bin/revdep-rebuild -- -p * 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 Your system is consistent -> gentoolkit-0.3.3 seems to contain a fix for that.
I can confirm that I have this error with the revdep-rebuild associated with app-portage/gentoolkit-0.3.2-r1, but using the version from app-portage/gentoolkit-0.3.3 makes the error go away. I also am using python2.7, not python3.4, as my default Python interpreter.
*** This bug has been marked as a duplicate of bug 589130 ***
Updating the title so hopefully more searches find a bug. In summary the bug is fixed in gentoolkit-0.3.3 and the bug does not impact the ability of revdep-rebuild to work correctly. It just causes the cache to not be written, so no speedup will occur from being able to use the cache.