Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 700466 - mail-client/roundcube-1.4.0 - webapp-config -U: File "/usr/lib64/python3.6/site-packages/WebappConfig/ebuild.py", line 91, in show_post post_instructions = open(post_file).readlines(): UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 3
Summary: mail-client/roundcube-1.4.0 - webapp-config -U: File "/usr/lib64/python3.6/si...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Aaron W. Swenson
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-11-18 09:44 UTC by Jaak Ristioja
Modified: 2020-05-11 10:52 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaak Ristioja 2019-11-18 09:44:39 UTC
* Upgrading /roundcube-1.3.10 to /roundcube-1.4.0
*   Installed by root on 2019-10-10 00:17:19
*   Config files owned by 0:0
!empty config
--- /srv/myweb/htdocs/.
* Unable to read the install database /var/db/webapps/roundcube/1.3.10/installs
* Remove whatever is listed above by hand
*   Creating required directories
*   Linking in required files
*     This can take several minutes for larger apps
*   Files and directories installed
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/webapp-config", line 42, in <module>
    main()
  File "/usr/lib/python-exec/python3.6/webapp-config", line 39, in main
    config.run()
  File "/usr/lib64/python3.6/site-packages/WebappConfig/config.py", line 1511, in run
    self.config.get('USER', 'pvr'))
  File "/usr/lib64/python3.6/site-packages/WebappConfig/server.py", line 131, in upgrade
    self.install(True)
  File "/usr/lib64/python3.6/site-packages/WebappConfig/server.py", line 284, in install
    self.__ebuild.show_postupgrade(self)
  File "/usr/lib64/python3.6/site-packages/WebappConfig/ebuild.py", line 130, in show_postupgrade
    self.show_post(filename = 'postupgrade-en.txt', ptype = 'upgrade', server = server)
  File "/usr/lib64/python3.6/site-packages/WebappConfig/ebuild.py", line 91, in show_post
    post_instructions = open(post_file).readlines()
  File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 388: ordinal not in range(128)

This seems to be caused by /usr/share/webapps/roundcube/1.4.0/postupgrade-en.txt  being encoded as UTF-8 instead of plain ASCII. Removing the file before running webapp-config -U seems to be one workaround, but then its contents are not displayed after the upgrade.
Comment 1 Tomáš Mózes 2019-11-18 15:48:23 UTC
Or switch your locale to en utf8.
Comment 2 Jaak Ristioja 2019-11-26 13:06:41 UTC
Bug still occurs with mail-client/roundcube-1.4.1.
Comment 3 Philippe Chaintreuil 2020-01-08 20:58:37 UTC
I just made a Github Pull Request[1] that switches to ASCII versions of the POST-UPGRADE files.  (Conversion via iconv.)  The only thing that changes is we lose the fancy directional double-quotes on a line each.

[1] https://github.com/gentoo/gentoo/pull/14283
Comment 4 Larry the Git Cow gentoo-dev 2020-05-11 10:52:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36cb516b465c8dd0495d3f45f05ce2f48fbfc294

commit 36cb516b465c8dd0495d3f45f05ce2f48fbfc294
Author:     Philippe Chaintreuil <gentoo_bugs_peep@parallaxshift.com>
AuthorDate: 2020-01-08 20:51:26 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-05-11 10:52:10 +0000

    mail-client/roundcube: POST-UPGRADE UTF-8 files to ASCII
    
    Just ran "iconv -f utf-8 -t ascii//TRANSLIT" on files/POST-UPGRADE*.
    
    Closes: https://bugs.gentoo.org/700466
    Closes: https://github.com/gentoo/gentoo/pull/14283
    Package-Manager: Portage-2.3.79, Repoman-2.3.16
    Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep@parallaxshift.com>
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 mail-client/roundcube/files/POST-UPGRADE.txt          | 2 +-
 mail-client/roundcube/files/POST-UPGRADE_complete.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)