diff --git a/docs/problems.rst b/docs/problems.rst index 179c411..a90fc02 100644 --- a/docs/problems.rst +++ b/docs/problems.rst @@ -6,21 +6,17 @@ For any unanswered questions or problems, see :doc:`contact`. .. _debian-urllib3: -Requests-related ImportErrors on Debian-based distributions ------------------------------------------------------------ +Requests-related ImportErrors +----------------------------- ImportError: No module named packages.urllib3.poolmanager ImportError: cannot import name iter_field_objects -Debian has had its problems in the past with the Python requests package, see -:gh:`82` and :gh:`140`. You have several options for solving this problem: +Debian and nowadays even other distros make modifications to the ``requests`` +package that don't play well with packages assuming a normal ``requests``. This +is due to stubbornness on both sides. -- Set the ``auth`` parameter of :storage:`caldav`, :storage:`carddav`, and/or - :storage:`http` to ``basic`` or ``digest`` (not ``guess``). - -- Upgrade your installation of the Debian requests package to at least version - ``2.4.3-1``. - -- If this doesn't help, install vdirsyncer in a virtualenv, see - :ref:`manual-installation`. +See :gh:`82` and :gh:`140` for past discussions. You have one option to work +around this, that is, to install vdirsyncer in a virtualenv, see +:ref:`manual-installation`. diff --git a/vdirsyncer/__init__.py b/vdirsyncer/__init__.py index e658625..e58faa0 100644 --- a/vdirsyncer/__init__.py +++ b/vdirsyncer/__init__.py @@ -31,16 +31,13 @@ del _check_python_version def _detect_faulty_requests(): # pragma: no cover import requests - if 'dist-packages' not in requests.__file__: - return text = ( - '{e}\n\n' - 'This most likely means you are running into a bug specific to ' - 'Debian-based distributions.\n\n' + 'Error during import: {e}\n\n' + 'If you have installed vdirsyncer from a distro package, please file ' + 'a bug against that package, not vdirsyncer.\n\n' 'Consult {d}/problems.html#requests-related-importerrors-on-debian' - '-based-distributions on how to deal with this, or use a different ' - 'operating system.' + '-based-distributions on how to work around this.' ) try: