mapping values are not allowed in this context
8,012
The issue is the indentation used within the .yaml file
In your example there is a two whitespace inndentation after 'network:' before 'version: 2' but after 'wifis:' and subsequently only one additional space is used as an indent. you can use either/or but not both, so the following will work:
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
wifis:
wlan0:
dhcp4:no
dhcp6:no
addresses: [10.10.10.1/24]
gateway4: 10.10.10.254
You MUST keep the indentations uniform
Related videos on Youtube
Author by
Sock Monkey
I like to code Personal Site: www.about7sharks.com
Updated on September 18, 2022Comments
-
Sock Monkey almost 2 years
# Let NetworkManager manage all devices on this system network: version: 2 renderer: NetworkManager wifis: wlan0: dhcp4:no dhcp6:no addresses: [10.10.10.1/24] gateway4: 10.10.10.254
Error message:
line 8 column 13: mapping values are not allowed in this contextWhat are mapping values?
-
steeldriver almost 6 yearsI don't know all the terminology, but I believe you need at least one space after the colon in each
key: value
pair i.e.dhcp4: no
anddhcp6: no
-
Sock Monkey almost 6 yearsI won't have access to that computer till tomorrow but the error is appearing on the addresses line, not the dhcp lines.
-
slangasek almost 6 yearsline 8 of the file you've pasted is certainly the dhcp6: line, not the addresses: line; the comment line counts as a line.
-
-
Sock Monkey almost 6 yearswww.yamllint.com corrected all the issues I was having.