Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fix chardet.detect exception

First, it is wrong: ValueError is about bad value of the right type,
but the error and the check is about type, not value.

Second, it lies about argument type assuming it unicode for all the
cases that are not valid. What gives you happy debug times until you
finally open chardet source code.

Third, chardet need to respect bytearray type as it could work with it
fine and which one is a legit for holding binary strings in PY3.
latest commit db77e13eeb
@kxepal kxepal authored
..
Failed to load latest commit information.
cli Create __init__.py in chardet.cli
__init__.py Fix chardet.detect exception
big5freq.py Remove flake8: noqa lines.
big5prober.py Made more attributes public.
chardistribution.py Made more attributes public.
charsetgroupprober.py Made more attributes public.
charsetprober.py Made more attributes public.
codingstatemachine.py Rename SMState to MachineState
compat.py Fix chardet.detect exception
cp949prober.py Made more attributes public.
enums.py Rename SMState to MachineState
escprober.py Made more attributes public.
escsm.py Rename SMState to MachineState
eucjpprober.py Made more attributes public.
euckrfreq.py Remove flake8: noqa lines.
euckrprober.py Made more attributes public.
euctwfreq.py Remove flake8: noqa lines.
euctwprober.py Made more attributes public.
gb2312freq.py Remove flake8: noqa lines.
gb2312prober.py Made more attributes public.
hebrewprober.py Loads of PEP8 naming convention fixes.
jisfreq.py Remove flake8: noqa lines.
jpcntx.py Remove flake8: noqa lines.
langbulgarianmodel.py Remove flake8: noqa lines.
langcyrillicmodel.py Remove flake8: noqa lines.
langgreekmodel.py Remove flake8: noqa lines.
langhebrewmodel.py Remove flake8: noqa lines.
langhungarianmodel.py Remove flake8: noqa lines.
langthaimodel.py Remove flake8: noqa lines.
langturkishmodel.py Fix Latin5TurkishModel key names.
latin1prober.py Loads of PEP8 naming convention fixes.
mbcharsetprober.py Made more attributes public.
mbcsgroupprober.py Made more attributes public.
mbcssm.py Rename SMState to MachineState
sbcharsetprober.py Loads of PEP8 naming convention fixes.
sbcsgroupprober.py Merge pull request #42 from chardet/feature/upstream-changes-and-over…
sjisprober.py Made more attributes public.
universaldetector.py Loads of PEP8 naming convention fixes.
utf8prober.py Rename SMState to MachineState
version.py Switch to using enums instead of constants, and a bunch of cleanup st…
Something went wrong with that request. Please try again.