Skip to content

[BUG] Fixing gg.utils.show_number_of_data_points #366

@AlexanderJuestel

Description

@AlexanderJuestel
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[38], line 1
----> 1 gg.utils.show_number_of_data_points(geo_model=geo_model)

File ~\Documents\gemgis\gemgis\utils.py:586, in show_number_of_data_points(geo_model)
    583 no_ori = []
    585 # Store values of number of interfaces and orientations in list
--> 586 for i in geo_model.surfaces.df.surface.unique():
    587     length = len(
    588         geo_model.surface_points.df[geo_model.surface_points.df["surface"] == i]
    589     )
    590     no_int.append(length)

File ~\AppData\Local\miniforge3\envs\gemgis12\Lib\site-packages\pydantic\main.py:991, in BaseModel.__getattr__(self, item)
    988     return super().__getattribute__(item)  # Raises AttributeError if appropriate
    989 else:
    990     # this is the current error
--> 991     raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}')

AttributeError: 'GeoModel' object has no attribute 'surfaces'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions