Repaired import error.

There is no chardet2 directory. Change the import statement.


Thanks!


Thank you for adopting! :+1: 


Any chance to get a new release ? This break installation with py3.x 


@gawel I doubt it. Just use the 0.14.2 tag and install from there, i.e., find what commit it belongs to and do `pip install -e git+git://github.com/kennethreitz/requests.git@sha`


Well, there is no doubt :)

```
cmdargs=[local('/home/gawel/py/pyquery/.tox/py33/bin/pip'), 'install', '--download-cache=/home/gawel/.buildout/tox/_download', 'nose', 'requests']
env={'PYTHONIOENCODING': 'utf_8', 'LC_CTYPE': 'fr_FR.UTF-8', 'LOGNAME': 'gawel', 'USER': 'gawel', 'PATH': '/home/gawel/py/pyquery/.tox/py33/bin:/home/gawel/py/bin:/home/gawel/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/home/gawel/.oh-my-vim/bin', 'GNOME_KEYRING_CONTROL': '/tmp/keyring-NnujB6', 'DISPLAY': ':0.0', 'SSH_AGENT_PID': '13212', 'LANG': 'fr_FR.UTF-8', 'TERM': 'xterm', 'SHELL': '/usr/bin/zsh', 'XDG_SESSION_PATH': '/org/freedesktop/DisplayManager/Session1', 'XAUTHORITY': '/home/gawel/.Xauthority', 'LANGUAGE': 'fr:en', 'SHLVL': '1', 'MANDATORY_PATH': '/usr/share/gconf/fluxbox.mandatory.path', 'WINDOWID': '20971946', 'EDITOR': 'vim --remote-silent', 'GREP_COLOR': '1;32', 'HOME': '/home/gawel', 'USERNAME': 'gawel', 'PYTHONPATH': '', 'SSH_AUTH_SOCK': '/tmp/ssh-nTYLBlQ13163/agent.13163', 'GDMSESSION': 'fluxbox', 'LSCOLORS': 'Gxfxcxdxbxegedabagacad', 'GNOME_KEYRING_PID': '13154', 'XDG_SEAT_PATH': '/org/freedesktop/DisplayManager/Seat0', 'XDG_SESSION_COOKIE': '373f267b0b8e9855d44d9fc100000008-1354114981.800514-1245713271', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-ajtHzXBpRy,guid=5b9f6e1a081e9f6bc10e3d6d0004b59a', '_': '/home/gawel/py/pyquery/./bin/tox', 'LC_MESSAGES': 'fr_FR.UTF-8', 'DESKTOP_SESSION': 'fluxbox', 'GREP_OPTIONS': '--color=auto', 'XDG_CONFIG_DIRS': '/etc/xdg/xdg-fluxbox:/etc/xdg', 'DEFAULTS_PATH': '/usr/share/gconf/fluxbox.default.path', 'OLDPWD': '/home/gawel', 'GTK_MODULES': 'canberra-gtk-module:canberra-gtk-module', 'XDG_DATA_DIRS': '/usr/share/fluxbox:/usr/local/share/:/usr/share/', 'PWD': '/home/gawel/py/pyquery', 'PIP_DOWNLOAD_CACHE': '/home/gawel/.buildout/tox/_download', 'COLORTERM': 'gnome-terminal', 'PAGER': '/home/gawel/bin/vimpager', 'LC_COLLATE': 'fr_FR.UTF-8'}
Downloading/unpacking nose
  Using download cache from /home/gawel/.buildout/tox/_download/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fn%2Fnose%2Fnose-1.2.1.tar.gz
  Running setup.py egg_info for package nose

    no previously-included directories found matching 'doc/.build'
Downloading/unpacking requests
  Using download cache from /home/gawel/.buildout/tox/_download/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fr%2Frequests%2Frequests-0.14.2.tar.gz
  Running setup.py egg_info for package requests
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/home/gawel/py/pyquery/.tox/py33/build/requests/setup.py", line 6, in <module>
        import requests
      File "./requests/__init__.py", line 52, in <module>
        from . import utils
      File "./requests/utils.py", line 22, in <module>
        from .compat import parse_http_list as _parse_list_header
      File "./requests/compat.py", line 112, in <module>
        from .packages import chardet2 as chardet
    ImportError: cannot import name chardet2
```

I will add requests as a pyquery dependencie. So I can really tell users to install requests from a git tag before installing pyquery :)

I'm working on it. So I'm a bit impatient :) But I can wait.


Huh. Interesting. Didn't realize that. 0.14.1 works perfectly though. I'm 100% certain of that. And I'm using it for github3.py without complaint from any users.


And you still have an error with master:

```
  Cloning git://github.com/kennethreitz/requests.git (to master) to /tmp/pip-us3ss0-build
  Running setup.py egg_info for package from git+git://github.com/kennethreitz/requests.git@master
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip-us3ss0-build/setup.py", line 6, in <module>
        import requests
      File "./requests/__init__.py", line 53, in <module>
        from .models import Request, Response
      File "./requests/models.py", line 37, in <module>
        from .compat import (
    ImportError: cannot import name chardet
```

But I saw an opened issue about chardet so maybe it's a known problem.


Yeah I'm working on a single fork of chardet that works under both python 2 and 3. That's over at sigmavirus24/charade (pull requests welcome) and that will become the new standard. @kennethreitz pulled in a non-functional version to replace chardet with. Any imports referring to chardet should now be broken and replaced by charade. For right now, the charade tests are failing unfortunately and I hope to have them passing in the majority soon. The latest version should be entirely functional.