Skip to content

Commit

Permalink
surpress unneeded warning from beautifulsoup
Browse files Browse the repository at this point in the history
  • Loading branch information
fboerman authored and fleimgruber committed May 14, 2024
1 parent 4db7dd7 commit 8a7b71a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion entsoe/entsoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import pytz
import requests
from bs4 import BeautifulSoup
from bs4.builder import XMLParsedAsHTMLWarning

from entsoe.exceptions import InvalidPSRTypeError, InvalidBusinessParameterError
from .exceptions import NoMatchingDataError, PaginationError
Expand All @@ -16,9 +17,12 @@
parse_imbalance_volumes_zip, parse_netpositions, parse_procured_balancing_capacity, \
parse_water_hydro
from .decorators import retry, paginated, year_limited, day_limited, documents_limited
import warnings

warnings.filterwarnings('ignore', category=XMLParsedAsHTMLWarning)

__title__ = "entsoe-py"
__version__ = "0.5.4"
__version__ = "0.5.5"
__author__ = "EnergieID.be, Frank Boerman"
__license__ = "MIT"

Expand Down
5 changes: 4 additions & 1 deletion entsoe/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
import zipfile
from io import BytesIO
from typing import Union

import warnings
import bs4
from bs4.builder import XMLParsedAsHTMLWarning
import pandas as pd

from .mappings import PSRTYPE_MAPPINGS, DOCSTATUS, BSNTYPE, Area

warnings.filterwarnings('ignore', category=XMLParsedAsHTMLWarning)

GENERATION_ELEMENT = "inBiddingZone_Domain.mRID"
CONSUMPTION_ELEMENT = "outBiddingZone_Domain.mRID"

Expand Down

0 comments on commit 8a7b71a

Please sign in to comment.