Skip to content
This repository was archived by the owner on Sep 20, 2025. It is now read-only.
This repository was archived by the owner on Sep 20, 2025. It is now read-only.

'NoneType' object has no attribute 'groups' #2

@JulioContrerasH

Description

@JulioContrerasH

This issue occurs when attempting to extract coordinates using the regular expression in main.py:

coords = chunk["stac:centroid"].apply(lambda x: point_pattern.match(x).groups())

Steps to Reproduce:

  1. Check the stac:centroid column for coordinates near zero.
  2. Try applying the point_pattern.match(x) to such rows.

Expected Behavior:
The code should handle invalid or near-zero coordinates gracefully and avoid the 'NoneType' error.

Suggested Fix:
Add a check for None before calling .groups() to handle invalid matches properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions