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

Decode error in vcard.py line 139 with python 3.x #62

Closed
croessner opened this issue Feb 1, 2017 · 2 comments
Closed

Decode error in vcard.py line 139 with python 3.x #62

croessner opened this issue Feb 1, 2017 · 2 comments
Assignees

Comments

@croessner
Copy link

croessner commented Feb 1, 2017

Hi,

line 139 in vard.py needs changes.

133         if line.encoded:
134             if 'BASE64' in line.singletonparams:
135                 line.singletonparams.remove('BASE64')
136                 line.encoding_param = cls.base64string
137             encoding = getattr(line, 'encoding_param', None)
138             if encoding:

139                 line.value = base64.b64decode(line.value)

140             else:
141                 line.value = stringToTextValues(line.value)[0]
142             line.encoded=False

I do not know, if this is ok for python 2.7 as well. So I did not make a PR here.

The error is that "str" dows not have an attribute "decode"

@croessner
Copy link
Author

Ah and of course you need to import base64

@wpercy wpercy self-assigned this Apr 11, 2017
@wpercy
Copy link
Contributor

wpercy commented Jun 20, 2017

Issue resolved in #49

@wpercy wpercy closed this as completed Jun 20, 2017
@wpercy wpercy modified the milestone: 0.9.5 Jun 27, 2017
mgorny pushed a commit to mgorny/vobject that referenced this issue Dec 17, 2024
Define a behaviour class for vCard 3.0 GEO lines, overriding the
default VCardTextBehavior to avoid backslash-escaping the required
semi-colon in GEO values.
mgorny pushed a commit to mgorny/vobject that referenced this issue Dec 17, 2024
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

2 participants