opengsq / opengsq-python

Python library designed for querying game servers. It supports 24 different query protocols and has been downloaded over 34,000 times.
https://python.opengsq.com/
MIT License
24 stars 3 forks source link

Documented instructions do not seem to work #3

Closed pblaas closed 2 years ago

pblaas commented 2 years ago

Hi,

Congrats on the release of 1.0.0. Unfortunately I can't get this to work with even your basic instruction from the main page.

Traceback (most recent call last): File "opengsq.py", line 2, in from opengsq.protocols import Source File "/Users/pblaas/Documents/github/insAPI/opengsq.py", line 2, in from opengsq.protocols import Source ModuleNotFoundError: No module named 'opengsq.protocols'; 'opengsq' is not a package

import asyncio
from opengsq.protocols import Source

async def main():
    source = Source(address='45.147.5.5', query_port=27015)
    info = await source.get_info()
    print(info)

asyncio.run(main())
▶ python -V
Python 3.8.10
▶ pip3 list|grep opengsq
opengsq                            1.0.0
BattlefieldDuck commented 2 years ago

I guess the naming of opengsq.py conflicts with opengsq library 😅, try to rename the opengsq.py file, thank you.

pblaas commented 2 years ago

Lol yes, sorry :/