Skip to content
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

AttributeError: module 'ts3' has no attribute 'query' #92

Open
stmstm-pixel opened this issue Nov 13, 2019 · 5 comments
Open

AttributeError: module 'ts3' has no attribute 'query' #92

stmstm-pixel opened this issue Nov 13, 2019 · 5 comments

Comments

@stmstm-pixel
Copy link

Hello.
AttributeError: module 'ts3' has no attribute 'query'
What can i do?

@aleksanderpsuj
Copy link

aleksanderpsuj commented Nov 23, 2019

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.

@stmstm-pixel
Copy link
Author

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:

@aleksanderpsuj
Copy link

Do you using virtual enviorment for that?

@stmstm-pixel
Copy link
Author

No.. My pc

@whookie
Copy link

whookie commented Dec 1, 2019

Have you tried looking at the module files?
The module is usually saved in pythons site- packages folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants