dedlfix: (PYTHON) lxml kann keinen URI öffnen

Beitrag lesen

Hi!

tree = etree.parse('www.google.de')
IOError: Error reading file 'b'www.google.de'': b'failed to load external entity "www.google.de"'

Aus der Dokumentation:

The parse() function supports any of the following sources:

* an open file object
    * a file-like object that has a .read(byte_count) method returning a byte string on each call
    * a filename string
    * an HTTP or FTP URL string

Sieht wohl so aus, als ob 'www.google.de' als Dateiname angesehen wird. Eine vollständige URL sieht auch etwas anders aus.

Lo!