My guess is that
1) The source you get has some other encoding than ASCII or UTF-8
2) Create File uses that encoding when writing the file (it doesn't
even accept encoding)
3) Get File uses UTF-8 encoding when reading the file (that's the default)
=> UnicodeDecodeError
You can test is my guess valid either by
- specifying a correct encoding to Get File (you should see it in the
source and the default is ISO-8859-1), or
- changing Create File to encode the given text by changing
"f.write(content)" to "f.write(content.encode('UTF-8')".
If I'm right, then the correct fix for this is adding encoding
argument to Create File keyword.
Cheers,
.peke
It should be UTF-8. Then the problem could also be that Get Source
doesn't decode the source correctly. Could you submit a but about this
either to Robot Framework or SeleniumLibrary issue tracker? If you
have a simple example that uses a public website it would help us
investigating it furthers.
I'll add a separate issue about Create File needing 'encode' argument.
Cheers,
.peke