nacos-sdk-python icon indicating copy to clipboard operation
nacos-sdk-python copied to clipboard

rm redundant errors

Open nightosong opened this issue 1 year ago • 0 comments

When I manually kill the main process, the multiprocessing.queue still attempts to read data, which results in an EOFError, followed by a long trace of error messages. These messages aren't particularly important, but they frequently clutter my terminal screen, especially during local debugging. So, I tried to suppress the errors caused by EOFError, but I'm not entirely sure if this will have other unintended consequences.

error messages:

INFO:     Started server process [85480]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:7760 (Press CTRL+C to quit)
^CINFO:     Shutting down
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
INFO:     Finished server process [85480]
Exception in thread Thread-15 (_process_polling_result):
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/songguodong/workspace/analysis-agent-python/.venv/lib/python3.11/site-packages/nacos/client.py", line 818, in _process_polling_result
    cache_key, content, md5 = self.notify_queue.get()
                              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/queues.py", line 103, in get
    res = self._recv_bytes()
          ^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/connection.py", line 216, in recv_bytes
    buf = self._recv_bytes(maxlength)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/connection.py", line 430, in _recv_bytes
    buf = self._recv(4)
          ^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/connection.py", line 399, in _recv
    raise EOFError
EOFError

nightosong avatar Sep 25 '24 10:09 nightosong