AttributeError: module 'ts3' has no attribute 'query'
Opened this issue · 5 comments
Hello.
AttributeError: module 'ts3' has no attribute 'query'
What can i do?
You probably have an older version v1
And this is code for older relases
import ts3.query
if __name__ == "__main__":
with ts3.query.TS3Connection(host=IP, port=PORT) as tsconnection:
tsconnection.use(sid=SID, port=SERVER_PORT)
tsconnection.login(client_login_name=USERNAME, client_login_password=PASSWORD)
# Example funcion
tsconnection.banlist()
Upgrade with pip to v2 with command:
pip3 install "ts3>=2.0.0b3" --upgrade
And problem should disappear.
ts3 v2 is already installed. Your code is not work..
ModuleNotFoundError: No module named 'ts3.query'; 'ts3' is not a package
P.S.
pip3 show ts3
Name: ts3
Version: 2.0.0b3
Summary: TS3 Server Query API and TS3 Client Query API
Home-page: https://github.com/benediktschmitt/py-ts3
Author: The py-ts3 authors
Author-email: UNKNOWN
License: not available
Location: c:\users\user\appdata\local\programs\python\python37\lib\site-packages
Requires: paramiko
Required-by:
Do you using virtual enviorment for that?
No.. My pc
Have you tried looking at the module files?
The module is usually saved in pythons site- packages folder