qingstor / qsctl

Advanced command line tool for QingStor Object Storage.
Apache License 2.0
23 stars 13 forks source link

Failed to find module packages.urllib3.util.retry #44

Closed martinyunify closed 7 years ago

martinyunify commented 7 years ago

The command "gitbook build . $FILENAME" exited with 0. 0.18s$ if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then openssl aes-256-cbc -K $encrypted_7127281a9724_key -iv $encrypted_7127281a9724_iv -in config.yaml.enc -out config.yaml -d; qsctl sync _book/qingcloud-apps-user-guide/ qs://appcenter-docs/user-guide/apps/ --config config.yaml; fi Traceback (most recent call last): File "/usr/local/bin/qsctl", line 21, in import qingstor.qsctl.driver File "/usr/local/lib/python2.7/dist-packages/qingstor/qsctl/driver.py", line 28, in from qingstor.qsctl.commands.ls import LsCommand File "/usr/local/lib/python2.7/dist-packages/qingstor/qsctl/commands/ls.py", line 23, in from .base import BaseCommand File "/usr/local/lib/python2.7/dist-packages/qingstor/qsctl/commands/base.py", line 25, in from qingstor.sdk.service.qingstor import QingStor File "/usr/local/lib/python2.7/dist-packages/qingstor/sdk/service/qingstor.py", line 22, in from requests.packages.urllib3.util.retry import Retry ImportError: No module named packages.urllib3.util.retry

The complete log can be found here https://api.travis-ci.org/jobs/256741370/log.txt?deansi=true

martinyunify commented 7 years ago

I'm wondering if there is any dependency update recently.

I got this error when I was trying to send generated docs to qingstor.

Below are some environment info.

Operating System Details Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty

$ sudo -H pip install qsctl Collecting qsctl /usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning. SNIMissingWarning /usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning Downloading qsctl-1.6.2-py2.py3-none-any.whl (56kB) Collecting qingstor-sdk>=2.1.0 (from qsctl) Downloading qingstor_sdk-2.1.1-py2.py3-none-any.whl Collecting tqdm>=4.0.0 (from qsctl) Downloading tqdm-4.15.0-py2.py3-none-any.whl (46kB) Requirement already satisfied: argparse>=1.1 in /usr/lib/python2.7 (from qsctl) Requirement already satisfied: PyYAML>=3.1 in /usr/lib/python2.7/dist-packages (from qsctl) Collecting docutils>=0.10 (from qsctl) Downloading docutils-0.13.1-py2-none-any.whl (537kB) Requirement already satisfied: requests in /usr/lib/python2.7/dist-packages (from qingstor-sdk>=2.1.0->qsctl) Installing collected packages: qingstor-sdk, tqdm, docutils, qsctl Successfully installed docutils-0.13.1 qingstor-sdk-2.1.1 qsctl-1.6.2 tqdm-4.15.0 /usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning

Xuanwo commented 7 years ago

So what's the version of requests you use? It's not a qsctl but a requests problem, maybe you need to upgrade requests to the latest version or downgrade to the version that qsctl specified.

martinyunify commented 7 years ago

resolved this issue by clearing the cache. Thanks!

martinyunify commented 7 years ago

I think It would be better if we add requests to dependency and update request when available. Could you please help update setup.py?

Xuanwo commented 7 years ago

Already added in qingstor-sdk https://github.com/yunify/qsctl/blob/master/setup.py#L9

I believe run pip install qsctl -U will solve the problem you met.