Thanks to visit codestin.com
Credit goes to github.com

Skip to content

urllib3 problems! #579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
persian-telegram opened this issue Apr 25, 2017 · 3 comments
Closed

urllib3 problems! #579

persian-telegram opened this issue Apr 25, 2017 · 3 comments

Comments

@persian-telegram
Copy link

persian-telegram commented Apr 25, 2017

Steps to reproduce

  1. Just trying to run a simple echobot

Expected behaviour

Tell us what should happen

  • telegram bot should work as normal
  • I tried everything and it worked on PythonAnywhere but i can't run it on my VPS.
  • I have also tried installing virtualenv but didn't work

$ virtualenv telegram-bot
$ source telegram-bot/bin/activate
$ pip install python-telegram-bot

Actual behaviour

Tell us what happens instead
error comes up

Configuration

Operating System:
ubuntu 14.04

Version of Python, python-telegram-bot & dependencies:
python 2.7, latest python-telegram-bot
$ python -m telegram

Logs

Insert logs here (if necessary)
root@persian-telegram-bot:~# screen -S myTelegramBot

  File "/root/telegram-bot/local/lib/python2.7/site-packages/urllib3/poolmanager.py", line 303, in urlopen
    conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/urllib3/poolmanager.py", line 219, in connection_from_host
    return self.connection_from_context(request_context)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/urllib3/poolmanager.py", line 232, in connection_from_context
    return self.connection_from_pool_key(pool_key, request_context=request_context)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/urllib3/poolmanager.py", line 245, in connection_from_pool_key
    pool = self.pools.get(pool_key)
  File "/root/telegram-bot/lib/python2.7/_abcoll.py", line 363, in get
    return self[key]
  File "/root/telegram-bot/local/lib/python2.7/site-packages/urllib3/_collections.py", line 53, in __getitem__
    item = self._container.pop(key)
  File "/usr/lib/python2.7/collections.py", line 138, in pop
    if key in self:
TypeError: unhashable type: 'list'
Exception in thread updater:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/telegram/ext/updater.py", line 115, in _thread_wrapper
    target(*args, **kwargs)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/telegram/ext/updater.py", line 228, in _start_polling
    self._bootstrap(bootstrap_retries, clean=clean, webhook_url='')
  File "/root/telegram-bot/local/lib/python2.7/site-packages/telegram/ext/updater.py", line 335, in _bootstrap
    self.bot.setWebhook(webhook_url=webhook_url, certificate=cert)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/telegram/bot.py", line 125, in decorator
    result = func(self, *args, **kwargs)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/telegram/bot.py", line 1280, in setWebhook
    result = self._request.post(url, data, timeout=timeout)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/telegram/utils/request.py", line 207, in post
    **urlopen_kwargs)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/telegram/utils/request.py", line 132, in _request_wrapper
    resp = self._con_pool.request(*args, **kwargs)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/urllib3/request.py", line 70, in request
    **urlopen_kw)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/urllib3/request.py", line 148, in request_encode_body
    return self.urlopen(method, url, **extra_kw)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/urllib3/poolmanager.py", line 303, in urlopen
    conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/urllib3/poolmanager.py", line 219, in connection_from_host
    return self.connection_from_context(request_context)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/urllib3/poolmanager.py", line 232, in connection_from_context
    return self.connection_from_pool_key(pool_key, request_context=request_context)
  File "/root/telegram-bot/local/lib/python2.7/site-packages/urllib3/poolmanager.py", line 245, in connection_from_pool_key
    pool = self.pools.get(pool_key)
  File "/root/telegram-bot/lib/python2.7/_abcoll.py", line 363, in get
    return self[key]
  File "/root/telegram-bot/local/lib/python2.7/site-packages/urllib3/_collections.py", line 53, in __getitem__
    item = self._container.pop(key)
  File "/usr/lib/python2.7/collections.py", line 138, in pop
    if key in self:
TypeError: unhashable type: 'list'
jh0ker added a commit that referenced this issue Apr 25, 2017
@persian-telegram
Copy link
Author

Thank you for the commit. Now when i try to pip install lxml I get this error

Command /root/telegram-bot/bin/python -c "import setuptools, tokenize;file='/root/telegram-bot/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-zywS9a-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/telegram-bot/include/site/python2.7 failed with error code 1 in /root/telegram-bot/build/lxml
Storing debug log for failure in /root/.pip/pip.log

@jh0ker
Copy link
Member

jh0ker commented Apr 25, 2017

Thank you for your report! I released a hotfix version to pypi. Please use pip install -U python-telegram-bot to upgrade.

@jh0ker
Copy link
Member

jh0ker commented Apr 25, 2017

I don't know about lxml, perhaps you don't have to required headers installed. This is not the right place for that question though.

@jh0ker jh0ker closed this as completed Apr 25, 2017
@jh0ker jh0ker added the bug label Apr 25, 2017
jh0ker added a commit that referenced this issue Apr 25, 2017
jh0ker added a commit that referenced this issue Apr 25, 2017
* πŸš‘ enforce urllib3==1.20

 #579

* πŸš‘ Bump version to v5.3.1

 #579
@jh0ker jh0ker mentioned this issue Apr 25, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants