Both work just fine on my side. There must be something else going on on your side. Could you try the examples from a clean Python session? Maybe your initial (I)Python session setup is changing something in lxml's global configuration?
Both work just fine on my side. There must be something else going on on your side. Could you try the examples from a clean Python session? Maybe your initial (I)Python session setup is changing something in lxml's global configuration?