Skip to content

Crash when reaching warnings.DeprecationWarning #1573

@ameraner

Description

@ameraner

Describe the bug
After #1565 , Satpy crashes when reaching e.g.
https://github.com/pytroll/satpy/blob/master/satpy/scene.py#L273-L274

To Reproduce

new_scn = scn.resample(scn.min_area())

Expected behavior
Show the DeprecationWarning and don't crash.
This is solved by removing the warnings.

warnings.warn("'min_area' is deprecated, use 'coarsest_area' instead.",
                      DeprecationWarning)

Actual results

  File "/tcenas/home/andream/code/satpy_latest/satpy/satpy/scene.py", line 274, in min_area
    warnings.DeprecationWarning)
AttributeError: module 'warnings' has no attribute 'DeprecationWarning'

Environment Info:
Python 3.7, latest Satpy master after the mentioned PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions