The problem occurs when i tried to modify the existing wireguard configuration on my test VM VyOS.
Error received when i tried to change a peer setting in Wireguard
vyos@vyos-router# commit
[ interfaces wireguard wg01 ]
Traceback (most recent call last):
File "/usr/libexec/vyos/conf_mode/wireguard.py", line 361, in
apply(c)
File "/usr/libexec/vyos/conf_mode/wireguard.py", line 224, in apply
addr_eff = re.sub("\'", "", c_eff.return_effective_values(intf + ' address')).split()
File "/usr/lib/python3.4/re.py", line 175, in sub
return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or buffer
[[interfaces wireguard wg01]] failed
Commit failed
[edit]
To solve it a looked into a similar problem here and here.
1.You can login to sudo by using sudo su and then
2. nano /usr/libexec/vyos/conf_mode/wireguard.py and
3. replace this line addr_eff = re.sub("\'", "", c_eff.return_effective_values(intf + ' address')).split()
with this line:
addr_eff = c_eff.return_effective_values(intf + ' address')
4. reload.