Skip to content

DeprecationWarning: chardet.universaldetector is deprecated, import UniversalDetector from chardet or chardet.detector instead #601

Description

@vivodi

fromchardet.universaldetectorimportUniversalDetector

C:\Users\vivodi\Projects\Flexget\.venv\Lib\site-packages\html5lib\html5parser.py:284: inparseself._parse(stream, False, None, *args, **kwargs)
C:\Users\vivodi\Projects\Flexget\.venv\Lib\site-packages\html5lib\html5parser.py:129: in_parseself.tokenizer=_tokenizer.HTMLTokenizer(stream, parser=self, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^C:\Users\vivodi\Projects\Flexget\.venv\Lib\site-packages\html5lib\_tokenizer.py:42: in__init__self.stream=HTMLInputStream(stream, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^C:\Users\vivodi\Projects\Flexget\.venv\Lib\site-packages\html5lib\_inputstream.py:145: inHTMLInputStreamreturnHTMLBinaryInputStream(source, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^C:\Users\vivodi\Projects\Flexget\.venv\Lib\site-packages\html5lib\_inputstream.py:422: in__init__self.charEncoding=self.determineEncoding(useChardet)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^C:\Users\vivodi\Projects\Flexget\.venv\Lib\site-packages\html5lib\_inputstream.py:486: indetermineEncodingfromchardet.universaldetectorimportUniversalDetector__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""Backward-compatibility stub for ``chardet.universaldetector``. chardet 6.x exposed :class:`UniversalDetector` via this module path. In chardet 7+ the canonical location is :mod:`chardet.detector`, but this stub keeps ``from chardet.universaldetector import UniversalDetector`` working for existing callers. .. deprecated:: 7.0 Import from :mod:`chardet` or :mod:`chardet.detector` instead. """from __future__ importannotationsimportwarningsfromchardet.detectorimportUniversalDetector>warnings.warn(
"chardet.universaldetector is deprecated, ""import UniversalDetector from chardet or chardet.detector instead",
DeprecationWarning,
stacklevel=2,
)
EDeprecationWarning: chardet.universaldetectorisdeprecated, importUniversalDetectorfromchardetorchardet.detectorinstead

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