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

get AttributeError: 'str' object has no attribute 'decode' error #16

Open
yuanmark opened this issue May 9, 2016 · 4 comments
Open

Comments

@yuanmark
Copy link

yuanmark commented May 9, 2016

When I downloaded and followed the install procedrue, it was ok.

When I put the first 3 lines of example.py imports, it was ok.
When I put the "w = xmind.load("test.xmind")",
I got:
...
File "C:\Python34\lib\site-packages\xmind-0.1a0-py3.4.egg\xmind\core__init__.py", line 204, in init
AttributeError: 'str' object has no attribute 'decode'" error.

I went to .\xmind-sdk-python-master\xmind\core__init__.py
and change line 204: self.TAG_NAME.decode("utf-8")
to self.TAG_NAME
and re-install xmind-sdk but still get the same error message.

What should I do?

@brumar
Copy link
Contributor

brumar commented May 9, 2016

I just read this http://stackoverflow.com/questions/28583565/str-object-has-no-attribute-decode-python-3-error. If I understood well, with python 3 every string is by default UTF-8. Can you try with python 2.7 ? That being said, it's indeed weird that you get the same error even after droping the "decode" part.

@nikevp
Copy link

nikevp commented Dec 8, 2017

bump

@SivaGabbi
Copy link

bump..

@brumar
Copy link
Contributor

brumar commented Dec 27, 2017

Instead of bumping, guys, could you try to be helpful and answer my question ? Worth to be noted : As you may suspect, this repository has gone staled. Check the few active forks. If I remember well, there is a python 3 fork.

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

No branches or pull requests

4 participants