eternnoir / pyTelegramBotAPI

Python Telegram bot api.
GNU General Public License v2.0
8.02k stars 2.02k forks source link

AttributeError: module 'queue' has no attribute 'LifoQueue' #298

Closed aRandomStranger closed 4 years ago

aRandomStranger commented 7 years ago

Please answer these questions before submitting your issue. Thanks!

  1. What version of pyTelegramBotAPI are you using? Latest

  2. What OS are you using? Ubuntu 16.04, Debian 9

  3. What version of python are you using? 3.5

--

Whenever I try to start my bots, this issue pops-up:

  File "run.py", line 1, in <module>
    \ufeffimport telebot
  File "/usr/local/lib/python3.5/dist-packages/telebot/__init__.py", line 23, in <module>
    from telebot import apihelper, types, util
  File "/usr/local/lib/python3.5/dist-packages/telebot/apihelper.py", line 3, in <module>
    import requests
  File "/usr/local/lib/python3.5/dist-packages/requests/__init__.py", line 52, in <module>
    from .packages.urllib3.contrib import pyopenssl
  File "/usr/local/lib/python3.5/dist-packages/requests/packages/__init__.py", line 27, in <module>
    from . import urllib3
  File "/usr/local/lib/python3.5/dist-packages/requests/packages/urllib3/__init__.py", line 8, in <module>
    from .connectionpool import (
  File "/usr/local/lib/python3.5/dist-packages/requests/packages/urllib3/connectionpool.py", line 58, in <module>
    class ConnectionPool(object):
  File "/usr/local/lib/python3.5/dist-packages/requests/packages/urllib3/connectionpool.py", line 65, in ConnectionPool
    QueueCls = queue.LifoQueue
AttributeError: module 'queue' has no attribute 'LifoQueue'

Never had it before. Strange.

eternnoir commented 7 years ago

What is your requests version?

yusisc commented 6 years ago

I met the same issue. Enlightened by 'module' object has no attribute 'Queue' · Issue #239 · python-zk/kazoo, I found there is a folder named queue in my work directory. I renamed that folder to queue01, then, the error is gone.

josephlane commented 6 years ago

@yusisc, thanks for sharing as this resolved the issue for me as well.

motyzk commented 6 years ago

@yusisc , thanks for sharing! resolved the issue I had.

perklet commented 6 years ago

@yusisc thanks, man. really weird problem

crafet commented 6 years ago

@yusisc thanks man,saving my day.

philophilo commented 5 years ago

@yusisc thanks, you have just save me hours

fanuch commented 4 years ago

Legend. Had a folder called ./lib/queue/ (probably from pip install -r requirements.txt -t lib). No idea what dependency installed it.

benmaier commented 4 years ago

@yusisc hero of the day

Leslor commented 3 years ago

@yusisc Thanks man!!

eusebiops14 commented 8 months ago

Thank you very much, sir

nilshof01 commented 1 week ago

Thanks!