You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 14, 2020. It is now read-only.
Hello,
Good job about this helpful module.
Nevertheless, I get the error below while a backup task. (Fortigate 3000D in v6.0.2).
"UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 690830: ordinal not in range(128)".
I can see the "Config system file has been downloaded by xxxx" event on the FGT. So the problem seems occuring during the file transfert or its writing.
Thank for your help.
Regards
Patrice
The text was updated successfully, but these errors were encountered:
Hello,
I have found the error cause.
There are utf-8 characters in some security objects.
So I fixed by importing "codecs" python module and using codecs.open function in backup function as below:
file = codecs.open(data['config_parameters']['filename'], 'w', 'utf-8')
My post is only for information and it is up to you to use it.
In my case, I will tell to my security officer to not use special character and add a checking routine to prevent it.
Regards.
Patrice
Hi @coquinpa
thanks for your comments and sorry for the late reply. We haven't had much time to look into it during these days. Glad to read that you found the issue.
We will be more than happy to take it into account, actually feel free to create a PR if you want to.
Otherwise I'll incoporte the changes you propose in the next days.
If you don't mind I'll leave this open until I incorporate the fix you mention or I receive a PR with the change, whatever happens first.
Hello,
Good job about this helpful module.
Nevertheless, I get the error below while a backup task. (Fortigate 3000D in v6.0.2).
"UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 690830: ordinal not in range(128)".
I can see the "Config system file has been downloaded by xxxx" event on the FGT. So the problem seems occuring during the file transfert or its writing.
Thank for your help.
Regards
Patrice
The text was updated successfully, but these errors were encountered: