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

turses crashes when config file exists #57460

Closed
booxter opened this issue Mar 11, 2019 · 0 comments
Closed

turses crashes when config file exists #57460

booxter opened this issue Mar 11, 2019 · 0 comments

Comments

@booxter
Copy link
Contributor

booxter commented Mar 11, 2019

Issue description

If you start turses without a config file, then it starts fine. But when later you exit it and start again, then it crashes with:

Traceback (most recent call last):
  File "/nix/store/sq21f09xlsm7bjd6vrihl9zg49alsvpr-python3.6-turses-0.3.1/bin/.turses-wrapped", line 12, in <module>
    sys.exit(main())
  File "/nix/store/sq21f09xlsm7bjd6vrihl9zg49alsvpr-python3.6-turses-0.3.1/lib/python3.6/site-packages/turses/cli.py", line 146, in main
    configuration.load()
  File "/nix/store/sq21f09xlsm7bjd6vrihl9zg49alsvpr-python3.6-turses-0.3.1/lib/python3.6/site-packages/turses/config.py", line 504, in load
    self._init_config()
  File "/nix/store/sq21f09xlsm7bjd6vrihl9zg49alsvpr-python3.6-turses-0.3.1/lib/python3.6/site-packages/turses/config.py", line 513, in _init_config
    self.parse_config_file(self.config_file)
  File "/nix/store/sq21f09xlsm7bjd6vrihl9zg49alsvpr-python3.6-turses-0.3.1/lib/python3.6/site-packages/turses/config.py", line 716, in parse_config_file
    self._parse_styles(conf)
  File "/nix/store/sq21f09xlsm7bjd6vrihl9zg49alsvpr-python3.6-turses-0.3.1/lib/python3.6/site-packages/turses/config.py", line 760, in _parse_styles
    conf.get(SECTION_STYLES, style), 'utf-8')
TypeError: decoding str is not supported

This error was fixed in louipc/turses@be0961b?diff=split but it's not part of tool official releases. (Note that the original upstream repo no longer exists; so we should switch to louipc fork of it.

Steps to reproduce

  1. nix-env -f . -i python3.6-turses
  2. turses
  3. close it with "q".
  4. turses

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

[ihar@dell:~/git/nixpkgs]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 4.14.105, NixOS, 18.09.2317.18fec2687c0 (Jellyfish)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.1.3`
 - channels(root): `"nixos-18.09.2317.18fec2687c0"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
booxter added a commit to booxter/nixpkgs that referenced this issue Mar 11, 2019
booxter added a commit to booxter/nixpkgs that referenced this issue Mar 26, 2019
booxter added a commit to booxter/nixpkgs that referenced this issue Mar 26, 2019
Fixes NixOS#57460

(cherry picked from commit 6f525a5)

Conflicts:
	pkgs/applications/networking/instant-messengers/turses/default.nix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant