netdata/netdata · error · ScannerError
could not found expected ':'
Error message
could not found expected ':'
What it means
Error "could not found expected ':'" thrown in netdata/netdata.
Source
Thrown at src/collectors/python.d.plugin/python_modules/pyyaml3/scanner.py:289
for level in self.possible_simple_keys:
key = self.possible_simple_keys[level]
if min_token_number is None or key.token_number < min_token_number:
min_token_number = key.token_number
return min_token_number
def stale_possible_simple_keys(self):
# Remove entries that are no longer possible simple keys. According to
# the YAML specification, simple keys
# - should be limited to a single line,
# - should be no longer than 1024 characters.
# Disabling this procedure will allow simple keys of any length and
# height (may cause problems if indentation is broken though).
for level in list(self.possible_simple_keys):
key = self.possible_simple_keys[level]
if key.line != self.line \
or self.index-key.index > 1024:
if key.required:
raise ScannerError("while scanning a simple key", key.mark,
"could not found expected ':'", self.get_mark())
del self.possible_simple_keys[level]
def save_possible_simple_key(self):
# The next token may start a simple key. We check if it's possible
# and save its position. This function is called for
# ALIAS, ANCHOR, TAG, SCALAR(flow), '[', and '{'.
# Check if a simple key is required at the current position.
required = not self.flow_level and self.indent == self.column
# A simple key is required only if it is the first token in the current
# line. Therefore it is always allowed.
assert self.allow_simple_key or not required
# The next token might be a simple key. Let's save it's number and
# position.
if self.allow_simple_key:View on GitHub (pinned to 4864de85e2)
Solutions
- The YAML scanner expected a ':' while scanning a mapping key.
- Fix the YAML syntax: ensure mapping keys are followed by ':'.
When it happens
Trigger: Thrown at src/collectors/python.d.plugin/python_modules/pyyaml3/scanner.py:289 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of netdata/netdata@4864de85e2 (2026-08-15).
Data as JSON: /api/errors/08f89f5f6f8a2fd9.
Report an issue: GitHub.