Closed B-Manel closed 3 years ago
Hey,
Would you mind running the following command in a terminal and posting the result to the issue?
awk 'NR>280&&NR310<' /pythonProject/venv/lib/python3.8/site-packages/reverb/server.py
Hey, this is what i got
awk: line 1: syntax error at or near end of line
Ops, sorry that was supposed to be:
awk 'NR>280&&NR<310' /pythonProject/venv/lib/python3.8/site-packages/reverb/server.py
if checkpointer is None: checkpointer = checkpointers.default_checkpointer()
self._server = pybind.Server([table.internal_table for table in tables],
port, checkpointer.internal_checkpointer())
self._port = port
def del(self): """Stop server and free up the port if was reserved through portpicker.""" if hasattr(self, '_server'): self.stop()
if hasattr(self, '_port'):
portpicker.return_port(self._port)
def repr(self): return repr(self._server)
@property def port(self): """Port the gRPC service is running at.""" return self._port
def stop(self): """Request that the ReverbService is terminated and wait for shutdown.""" return self._server.Stop()
def wait(self):
Ok so the error is coming from the line portpicker.return_port(self._port)
. Not really sure why this is happening but it shouldn't really be causing any issues for you anyway since the message is coming from the garbage collection.
Just out of curiosity. What happens if you open up a python interpreter and do:
>>> import portpicker
>>> port = portpicker.pick_unused_port()
>>> port
23075
>>> portpicker.return_port(port)
?
Yeah it's not causing any issues just wanted to know what might be the cause.
Return_port isn't outputting anything so i guess that's why i get NoneType error, no clue why it's happening though. In any case thanks for your answer!
import portpicker port = portpicker.pick_unused_port() port 24178 portpicker.return_port(port)
Yeah I also have no idea why it is happening but I can't imagine this causing any issues (apart from noisy logs) so I'm going to close this issue down.
Thanks for raising the issue though!
I have the same error. It seems like the portpicker.return_port
function itself is None
.
This is consistent with the observation here that globally imported modules might already have been deleted before they are used in __del__()
.
Anyone encountered this exception when stopping replay server? [reverb/cc/platform/default/server.cc:63] Shutting down replay server Exception ignored in: <function Server.del at 0x7f844a1f8c10> Traceback (most recent call last): File "/pythonProject/venv/lib/python3.8/site-packages/reverb/server.py", line 295, in del TypeError: 'NoneType' object is not callable