Robotframework "Choose file" causes AttributeError: module 'base64' has no attribute 'encodestring' in docker
Based on the traceback you have found this issue:
Selenium 3 is incompatible with Python 3.9
This is the fix for the issue: DeprecationWarning of base64.encodestring().
They won't back port this fix:
Thanks for the issue. We won't be releasing another version 3 as we'reheading to finishing off Selenium 4. It is a drop in replacement touse Selenium 4.0.0.a5 so should work the same. There should not be anybreaking changes.
- So you could upgrade selenium to Selenium 4.0.0.a5 or
- Downgrade Python to 3.7 for example. I suppose locally you do not run 3.9.
We were running into this issue as well, but going back to an older version of Python was not an option due to incompatibilities with other libraries. If you find yourself in the same spot, you can re-create the alias like so:
import base64base64.encodestring = base64.encodebytes
In whatever your entry-point is.