serverstf / python-valve

A Python Interface to various Valve products and services
Other
236 stars 71 forks source link

a2s.py - TypeError: request() takes 2 positional arguments but 3 were given #51

Closed masonr closed 6 years ago

masonr commented 6 years ago

Just installed python-valve and am trying to get a test running without any errors. I've installed the package using the setup.py file rather than pip to ensure I am running the latest. However, there's an issue when running the simple example from the docs.

Here's the error:

$ python3 test.py 
Traceback (most recent call last):
  File "test.py", line 6, in <module>
    info = server.info()
  File "/usr/local/lib/python3.5/dist-packages/python_valve-0.2.0-py3.5.egg/valve/source/a2s.py", line 138, in info
  File "/usr/local/lib/python3.5/dist-packages/python_valve-0.2.0-py3.5.egg/valve/source/a2s.py", line 28, in request
TypeError: request() takes 2 positional arguments but 3 were given
Yepoleb commented 6 years ago

Just fixed this in the request branch. Switch to it using git checkout request.

masonr commented 6 years ago

@Yepoleb - Cheers, you're awesome! I appreciate the quick fix.

Holiverh commented 6 years ago

My bad. Thanks for the report @masonr and thanks for the quick fix @Yepoleb. Might as well cut a whole new release seeing as 0.2.0 is broken then?

Yepoleb commented 6 years ago

That's what patch releases are for, aren't they?

Holiverh commented 6 years ago

Hmm, checked semver. I was under the impression the patch version was effectively redundant <1.0. Seems like it doesn't really matter either way; any change is a breaking change technically. I'll lob a 0.2.1 out there. :+1: