Getting issue with kiteconnect python library

meeashok
meeashok edited December 2018 in Python client
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 163, in _run_module_as_main
mod_name, _Error)
File "/usr/lib64/python2.7/runpy.py", line 102, in _get_module_details
loader = get_loader(mod_name)
File "/usr/lib64/python2.7/pkgutil.py", line 464, in get_loader
return find_loader(fullname)
File "/usr/lib64/python2.7/pkgutil.py", line 474, in find_loader
for importer in iter_importers(fullname):
File "/usr/lib64/python2.7/pkgutil.py", line 430, in iter_importers
__import__(pkg)
File "trading/feeds/backfill_dynamo_feed.py", line 13, in
z_broker = ZBroker()
File "zerodha/broker.py", line 34, in __init__
self.kite = ZBroker.get_kite_object()
File "zerodha/broker.py", line 487, in get_kite_object
kite = KiteConnect(api_key="XXXXXXX")
File "build/bdist.linux-x86_64/egg/kiteconnect/connect.py", line 183, in __init__
AttributeError: 'module' object has no attribute 'urllib3'

I am already using the version of request module

pip show requests
Name: requests
Version: 2.21.0
Summary: Python HTTP for Humans.
Home-page: http://python-requests.org
Author: Kenneth Reitz
Author-email: [email protected]
License: Apache 2.0
Location: /usr/lib/python2.7/site-packages
Requires: chardet, idna, certifi, urllib3
  • meeashok
    Also, I have 2 machines with same version of requests and urllib3. kiteconnect is not working on one machine, but works on another.
  • rakeshr
    @meeashok
    Can you perform the below step and check if urllib3 module is installed properly.
    pip install requests==2.21.0
    Open python in interactive mode
    python
    >>>import requests
    >>> requests.packages.urllib3
Sign In or Register to comment.