Skip to content
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.

AttributeError: 'str' object has no attribute 'decode' #6

Closed
yssource opened this issue Jul 2, 2018 · 3 comments
Closed

AttributeError: 'str' object has no attribute 'decode' #6

yssource opened this issue Jul 2, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@yssource
Copy link

yssource commented Jul 2, 2018

  • pip install -e .
  • python3.6
Recording started, enter "exit" command or Control-D to end
Traceback (most recent call last):
  File "/home/jimmy/.pyenv/versions/anaconda3-5.0.1/envs/devel/bin/termtosvg", line 11, in <module>
    load_entry_point('termtosvg', 'console_scripts', 'termtosvg')()
  File "/home/jimmy/workspace/git/termtosvg/termtosvg/__main__.py", line 172, in main
    columns, lines, system_theme = term.get_configuration(output_fileno)
  File "/home/jimmy/workspace/git/termtosvg/termtosvg/term.py", line 340, in get_configuration
    xresources_str = _get_xresources()
  File "/home/jimmy/workspace/git/termtosvg/termtosvg/term.py", line 367, in _get_xresources
    return data.value.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'

It maybe happen to me only. And I try to fix this for myself by removing .decode('utf-8')

File "/home/jimmy/workspace/git/termtosvg/termtosvg/term.py", line 367, in _get_xresources
return data.value # now, works ok.

yssource added a commit to yssource/termtosvg that referenced this issue Jul 2, 2018
AttributeError: 'str' object has no attribute 'decode'
@nbedos
Copy link
Owner

nbedos commented Jul 2, 2018

Hi, sorry about that.

This part of the code has been removed for the next release. The release candidate is available on the branch release/0.3.0 and can also be downloaded from pypi test server:

pip install --extra-index-url https://test.pypi.org/simple/ 'termtosvg>=0.3.0rc0'

@nbedos nbedos added the bug Something isn't working label Jul 2, 2018
@nbedos
Copy link
Owner

nbedos commented Jul 2, 2018

For your information I've just released version 0.3.0 of termtosvg.

@yssource
Copy link
Author

yssource commented Jul 3, 2018

Thanks, the new released version works for me.

@yssource yssource closed this as completed Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants