Skip to content

Commit e0684ff

Browse files
authored
Merge pull request #7 from huggingface/user/aliberts/2024_04_28_remove_warnings
Remove "pkg_resources deprecated" warning
2 parents 080d4ce + 3896688 commit e0684ff

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gym_pusht/envs/pusht.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import collections
22
import os
3+
import warnings
34

45
import cv2
56
import gymnasium as gym
67
import numpy as np
7-
import pygame
8+
9+
with warnings.catch_warnings():
10+
# Filter out DeprecationWarnings raised from pkg_resources
11+
warnings.filterwarnings("ignore", "pkg_resources is deprecated as an API", category=DeprecationWarning)
12+
import pygame
13+
814
import pymunk
915
import pymunk.pygame_util
1016
import shapely.geometry as sg

0 commit comments

Comments
 (0)