oraios/serena · error · ValueError
The ignored patterns could not be computed; please check the
Error message
The ignored patterns could not be computed; please check the log for errors and report here: https://github.com/oraios/serena/issues
What it means
Raised by the Project._ignored_patterns property (src/serena/project.py:208) when the lazily-computed ignored patterns list remains None after waiting on the background initialization event. Like _ignore_spec, this is a defensive guard against an unexpected failure of the background pattern computation.
Source
Thrown at src/serena/project.py:208
log.info("Ignore spec is now available for project; proceeding")
if self.__ignore_spec is None:
raise ValueError(
"The ignore spec could not be computed; please check the log for errors and report here: https://github.com/oraios/serena/issues"
)
return self.__ignore_spec
@property
def _ignored_patterns(self) -> list[str]:
"""
:return: the list of ignored path patterns
"""
if not self._ignore_spec_available.is_set():
log.info("Waiting for ignored patterns to become available ...")
self._ignore_spec_available.wait()
if self.__ignored_patterns is not None:
log.info("Ignored patterns are now available for project; proceeding")
if self.__ignored_patterns is None:
raise ValueError(
"The ignored patterns could not be computed; please check the log for errors and report here: https://github.com/oraios/serena/issues"
)
return self.__ignored_patterns
def _is_ignored_relative_path(self, relative_path: str | Path, ignore_non_source_files: bool = True) -> bool:
"""
Determine whether a path should be ignored based on file type and ignore patterns.
Returns False for non-existent paths since they cannot be matched by ignore patterns.
:param relative_path: Relative path to check
:param ignore_non_source_files: whether files that are not source files (according to the file masks
determined by the project's programming language) shall be ignored
:return: whether the path should be ignored
"""
# special case, never ignore the project root itself
# If the user ignores hidden files, "." might match against the corresponding PathSpec pattern.
# The empty string also points to the project root and should never be ignored.View on GitHub (pinned to 7fcbca7e62)
Solutions
- Inspect Serena logs for the underlying exception during pattern computation
- Fix invalid ignore configuration files in the project
- Report to https://github.com/oraios/serena/issues if logs show no actionable cause
Defensive patterns
Strategy: fallback
Validate before calling
project._ignore_spec_available.wait(timeout=30) # patterns share the init event
Try / catch
try:
patterns = project._ignored_patterns
except ValueError as e:
logging.error('Ignored patterns unavailable: %s', e)
patterns = [] Prevention
- Validate ignore configuration files
- Check startup logs for background-init exceptions
- Report persistent occurrences to the Serena issue tracker
When it happens
Trigger: Accessing _ignored_patterns while the background computation crashed or failed to publish its result.
Common situations: Same as [102]: bad ignore config, library incompatibility, or a genuine Serena bug; typically accompanied by errors in the log.
Related errors
- The ignore spec could not be computed; please check the log
- Path {relative_path} is ignored
- This method must be overridden for each subclass
- Context file not found: {path.resolve()}
- Cannot use both fixed_tools and excluded_tools/included_opti
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/5613de533fd9ad73.
Report an issue: GitHub.