tsifrer / python-twitch-client

Python wrapper for Twitch API

Home Page:http://python-twitch-client.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImportError: cannot import name 'TwitchClient' from 'twitch'

SweetBaget opened this issue · comments

Can't find this name in twitch module. I've checked dir(twitch) and get this list: ['Callable', 'Chat', 'Helix', 'List', 'TMI', 'V5', 'all', 'annotations', 'builtins', 'cached', 'doc', 'file', 'loader', 'name', 'package', 'path', 'spec', 'api', 'baseresource', 'cache', 'chat', 'helix', 'name', 'tmi', 'v5']
Where TwitchHelix and TwitchClient?
OC: Windows 10 LTSC
Python 3.8.5

Collecting python-twitch-client
Using cached python_twitch_client-0.6.0-py3-none-any.whl (20 kB)
Requirement already satisfied: requests>=2.18.4 in c:\users\sweetbaget\appdata\local\programs\python\python38-32\lib\site-packages (from python-twitch-client) (2.24.0)
Requirement already satisfied: six>=1.11.0 in c:\users\sweetbaget\appdata\roaming\python\python38\site-packages (from python-twitch-client) (1.15.0)
Requirement already satisfied: idna<3,>=2.5 in c:\users\sweetbaget\appdata\local\programs\python\python38-32\lib\site-packages (from requests>=2.18.4->python-twitch-client) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\sweetbaget\appdata\local\programs\python\python38-32\lib\site-packages (from requests>=2.18.4->python-twitch-client) (2020.6.20)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\sweetbaget\appdata\local\programs\python\python38-32\lib\site-packages (from requests>=2.18.4->python-twitch-client) (1.25.10)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\sweetbaget\appdata\local\programs\python\python38-32\lib\site-packages (from requests>=2.18.4->python-twitch-client) (3.0.4)
Installing collected packages: python-twitch-client
Successfully installed python-twitch-client-0.6.0

Ok, i've just downloaded .zip version and puted my file in general directory. But don't delete this post. The Problem is still exist

I am having the same issue here .If you know the solution to this problem, please help me out.Here is what am seeing in the terminal.

Traceback (most recent call last): File "test.py", line 1, in <module> from twitch import TwitchClient File "C:\Users\mushe\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twitch\__init__.py", line 3, in <module> from twitch.chat import Chat File "C:\Users\mushe\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twitch\chat\__init__.py", line 5, in <module> from .message import Message File "C:\Users\mushe\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twitch\chat\message.py", line 3, in <module> from twitch.helix import User, Helix File "C:\Users\mushe\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twitch\helix\__init__.py", line 3, in <module> from twitch.helix.helix import Helix File "C:\Users\mushe\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twitch\helix\helix.py", line 5, in <module> from twitch.api import API ImportError: cannot import name 'API' from 'twitch.api' (C:\Users\mushe\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twitch\api\__init__.py)

I used this from twitch.helix.api import TwitchHelix