You have given little info about what you use,are you using now older Python Mechanize?
For Post data is Requests or selenium if JavaScripts make problems,common to use.
Are you using Python 3?
For Post data is Requests or selenium if JavaScripts make problems,common to use.
Are you using Python 3?
Quote:a bytes-like object is required, not 'str'No seeing all code this is just guessing,you can try convert str to bytes.
>>> s = 'hello' >>> type(s) <class 'str'> >>> >>> # To bytes >>> s = s.encode() >>> s b'hello' >>> type(s) <class 'bytes'>