Closed alfonsocaponi closed 5 years ago
Hi Alfonso,
You need the following line at the start of your program to fix the exception handling routine: import traceback
The problem you are hitting with 'TypeError: Can't convert 'bytes' object to str implicitly' is that a string and bytes are treated differently. Strings needed to be encoded/decoded to bytes (i.e. unicode to binary storage) but for your simple script you should be able to add the 'b' prefix to the username and password as required i.e. username = b'user' password = b'pass'
The original calling program uses .encode() on strings from the config and GUI as required when calling the library: res = libautoflashgui.mainScript(self.host.get(), self.username.get().encode(), self.password.get().encode(), self.flashfirmware.get(), self.firmwarefile.get(), self.flashSleepDelay, self.methodAction.get(), self.command.get(), self.splitActive.get(), self.ddnsService.get(), self.connectRetryDelay, self.interCommandDelay)
Can you please try defining your username and password with b'' and see if it fixes your error?
Regards, Mark.
Closing, please re-open if you need more help. :) Cheers, Mark.
Hi all,
I would like create a simple script only for the authentication. I've customized "libautoflashgui.py" but I've a problem with my Technicolor AGTHP_1.1.2:
It produces:
Any tips? Thank you very much!