Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: invalid mode: 'UTF-8' when run banner-show or banner-validate on F28 #3140

Closed
pki-bot opened this issue Oct 3, 2020 · 6 comments
Closed
Milestone

Comments

@pki-bot
Copy link

pki-bot commented Oct 3, 2020

This issue was migrated from Pagure Issue #3022. Originally filed by bbhavsar (@bhavikbhavsar) on 2018-05-21 14:57:19:


Observation:
On F28 upon running banner-show or banner-validate ERROR: invalid mode: 'UTF-8' appears.

[root@pki1 fedora]# rm -rf /etc/pki/topology-02-CA/banner.txt
[root@pki1 fedora]# pki-server banner-show -i topology-02-CA
ERROR: Banner is not installed
[root@pki1 fedora]# pki-server banner-validate -i topology-02-CA
-----------------------
Banner is not installed
-----------------------

[root@pki1 fedora]# echo "Warning" > /etc/pki/topology-02-CA/banner.txt
[root@pki1 fedora]# pki-server banner-validate -i topology-02-CA
ERROR: invalid mode: 'UTF-8'
[root@pki1 fedora]# file /etc/pki/topology-02-CA/banner.txt
/etc/pki/topology-02-CA/banner.txt: ASCII text
[root@pki1 fedora]# pki-server banner-show -i topology-02-CA
ERROR: invalid mode: 'UTF-8'

Stack trace:

[root@pki1 ~]# pki-server banner-show -i topology-02-CA -vv
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/pki/server/pkiserver.py", line 119, in <module>
    cli.execute(sys.argv)
  File "/usr/lib/python3.6/site-packages/pki/server/pkiserver.py", line 111, in execute
    super(PKIServerCLI, self).execute(args)
  File "/usr/lib/python3.6/site-packages/pki/cli/__init__.py", line 204, in execute
    module.execute(module_args)
  File "/usr/lib/python3.6/site-packages/pki/cli/__init__.py", line 204, in execute
    module.execute(module_args)
  File "/usr/lib/python3.6/site-packages/pki/server/cli/banner.py", line 97, in execute
    print(instance.get_banner())
  File "/usr/lib/python3.6/site-packages/pki/server/__init__.py", line 980, in get_banner
    return codecs.open(self.banner_file, "UTF-8").read().strip()
  File "/usr/lib64/python3.6/codecs.py", line 897, in open
    file = builtins.open(filename, mode, buffering)
ValueError: invalid mode: 'UTF-8'
ERROR: invalid mode: 'UTF-8'

Build:
[root@pki1 ~]# rpm -qa | grep pki
python3-pki-10.6.1-3.20180520020012.b743abbe.fc28.noarch
pki-ca-10.6.1-3.20180520020012.b743abbe.fc28.noarch
pki-tps-10.6.1-3.20180520020012.b743abbe.fc28.x86_64
pki-tools-10.6.1-3.20180520020012.b743abbe.fc28.x86_64
pki-server-10.6.1-3.20180520020012.b743abbe.fc28.noarch
pki-tks-10.6.1-3.20180520020012.b743abbe.fc28.noarch
dogtag-pki-10.6.1-3.20180520020012.b743abbe.fc28.noarch
pki-base-java-10.6.1-3.20180520020012.b743abbe.fc28.noarch
pki-ocsp-10.6.1-3.20180520020012.b743abbe.fc28.noarch
dogtag-pki-server-theme-10.6.1-3.20180520020012.b743abbe.fc28.noarch
pki-base-10.6.1-3.20180520020012.b743abbe.fc28.noarch
pki-console-10.6.1-3.20180520020012.b743abbe.fc28.noarch
dogtag-pki-console-theme-10.6.1-3.20180520020012.b743abbe.fc28.noarch
pki-kra-10.6.1-3.20180520020012.b743abbe.fc28.noarch
pki-symkey-10.6.1-3.20180520020012.b743abbe.fc28.x86_64
@pki-bot pki-bot added this to the 10.6.7 milestone Oct 3, 2020
@pki-bot
Copy link
Author

pki-bot commented Oct 3, 2020

Comment from bbhavsar (@bhavikbhavsar) at 2018-05-22 06:06:16

Metadata Update from @bhavikbhavsar:

  • Custom field component adjusted to None
  • Custom field feature adjusted to None
  • Custom field origin adjusted to None
  • Custom field proposedmilestone adjusted to None
  • Custom field proposedpriority adjusted to None
  • Custom field reviewer adjusted to None
  • Custom field type adjusted to None
  • Custom field version adjusted to None
  • Issue priority set to: blocker

@pki-bot pki-bot closed this as completed Oct 3, 2020
@pki-bot
Copy link
Author

pki-bot commented Oct 3, 2020

Comment from mharmsen (@mharmsen) at 2018-05-23 18:00:32

Metadata Update from @mharmsen:

  • Issue set to the milestone: 0.0 NEEDS_TRIAGE

@pki-bot
Copy link
Author

pki-bot commented Oct 3, 2020

Comment from edewata (@edewata) at 2018-10-03 09:40:07

Metadata Update from @edewata:

  • Issue assigned to edewata

@pki-bot
Copy link
Author

pki-bot commented Oct 3, 2020

Comment from edewata (@edewata) at 2018-10-03 09:40:35

Metadata Update from @edewata:

  • Issue close_status updated to: fixed
  • Issue status updated to: Closed (was: Open)

@pki-bot
Copy link
Author

pki-bot commented Oct 3, 2020

Comment from edewata (@edewata) at 2018-10-03 09:41:05

This problem is no longer happening in the latest build.

@pki-bot
Copy link
Author

pki-bot commented Oct 3, 2020

Comment from edewata (@edewata) at 2018-10-03 09:41:45

Metadata Update from @edewata:

  • Issue set to the milestone: 10.6.7 (was: 0.0 NEEDS_TRIAGE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant