You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do appreciate the shorthand users_by_name. However, users_by_name results in a bad request. See below example what does not work, and what my current workaround looks like:
>>>importstackexchangeasse>>>site=se.Site(se.StackOverflow)
>>>site.users_by_name('f4lco') # This does not workTraceback (mostrecentcalllast):
File"<stdin>", line1, in<module>File"/Users/.../py3.9/lib/python3.9/site-packages/stackexchange/site.py", line230, inusers_by_namereturnself.users(**kw)
File"/Users/.../py3.9/lib/python3.9/site-packages/stackexchange/site.py", line226, inusersreturnself._get(User, ids, 'users', kw)
File"/Users/.../py3.9/lib/python3.9/site-packages/stackexchange/site.py", line213, in_getreturnself.build(root, typ, coll, kw)
File"/Users/.../py3.9/lib/python3.9/site-packages/stackexchange/site.py", line190, inbuildjson=self._request(url, kw)
File"/Users/.../py3.9/lib/python3.9/site-packages/stackexchange/site.py", line161, in_requestjson, info=request_mgr.json_request(url, new_params)
File"/Users/.../py3.9/lib/python3.9/site-packages/stackexchange/web.py", line163, injson_requestreq=self.request(to, params)
File"/Users/.../py3.9/lib/python3.9/site-packages/stackexchange/web.py", line150, inrequestraiseStackExchangeError(error_ob.get('error_id', StackExchangeError.UNKNOWN), error_ob.get('error_name'), error_ob.get('error_message'))
stackexchange.core.StackExchangeError: 400 [bad_parameter]: Invalidfilterspecified>>>site.users(inname='f4lco') # This does work, but it's not really obvious
(<User'f4lco' (345057) @ 10e9d9c40>, <User'wiref4lcon' (13192697) @ 10e9eca90>)
I'm running OS X, Python 3.9, and Py-StackExchange 2.2.7.
The text was updated successfully, but these errors were encountered:
I do appreciate the shorthand
users_by_name
. However,users_by_name
results in a bad request. See below example what does not work, and what my current workaround looks like:I'm running OS X, Python 3.9, and Py-StackExchange 2.2.7.
The text was updated successfully, but these errors were encountered: