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

Fixed call to encode #185

Merged
merged 1 commit into from
Jan 28, 2016
Merged

Fixed call to encode #185

merged 1 commit into from
Jan 28, 2016

Conversation

peterdemin
Copy link

Otherwise I was getting following error during import:

File "src/lxml/lxml.etree.pyx", line 169, in init lxml.etree (src/lxml/lxml.etree.c:229940)
TypeError: encode() argument 1 must be string without null bytes, not unicode

Also vim auto-fixed trailing spaces.

Otherwise I was getting following error:

File "src/lxml/lxml.etree.pyx", line 169, in init lxml.etree (src/lxml/lxml.etree.c:229940)
TypeError: encode() argument 1 must be string without null bytes, not unicode

It's rare branch, that's why this bug remained in codebase for a very long time
@scoder
Copy link
Member

scoder commented Jan 28, 2016

Hmm, I wonder why this poses a problem for you. This code is executed for everyone right on import...

Anyway, it's actually the right thing to do here, so, thanks!

scoder added a commit that referenced this pull request Jan 28, 2016
@scoder scoder merged commit e0b9c51 into lxml:master Jan 28, 2016
@peterdemin
Copy link
Author

I did some experiments, and found out, that this one is very hard to reproduce. Here are my steps:

  1. Build uwsgi wheel using Python 2.7.6
  2. Install it in Python 2.7.10
  3. Load application, that imports lxml.

Actually I don't understand, why it happens...

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