__call__() require one positional argument 'request'

252 views
Skip to first unread message

sheikh jebran

unread,
Jun 4, 2021, 11:51:23 PM6/4/21
to grpc.io
Hi Team,

I have created a proto file for a method which dont not take any argument nor return back any thing,

but when i run my code it throws the below exception


Connected to pydev debugger (build 211.7442.45)
1041
1041
Traceback (most recent call last):
  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevd.py", line 1483, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/Users/sheikhjebran/Desktop/new/mySocket.py", line 52, in <module>
    sample()
  File "/Users/sheikhjebran/Desktop/new/mySocket.py", line 35, in sample
    stub.Reset()
TypeError: __call__() missing 1 required positional argument: 'request'
python-BaseException

Process finished with exit code 1

Richard Belleville

unread,
Jun 16, 2021, 2:15:53 PM6/16/21
to grpc.io

There's not a lot of information to go on here, but your error message is pretty clear in one respect:

TypeError: __call__() missing 1 required positional argument: 'request'

You need to supply a request when you invoke your stub (which is presumably what you're doing in this snippet).
Reply all
Reply to author
Forward
0 new messages