Open Trilarion opened 6 years ago
Oddly enough, I get a similar error with macOS:
2017-07-18 15:46:51,968 - root - INFO - writing detailed log messages to /Users/Kristian/.config/imperialism_remake/remake.log
2017-07-18 15:46:51,969 - root - INFO - writing error log messages to /Users/Kristian/.config/imperialism_remake/remake.error.log
2017-07-18 15:46:52,004 - __main__ - INFO - created log receiver thread (pid=30382)
2017-07-18 15:46:52,004 - root - INFO - user data stored in: /Users/Kristian/.config/imperialism_remake
2017-07-18 15:46:52,105 - root - INFO - options loaded from user folder (/Users/Kristian/.config/imperialism_remake)
PasteBoard: Error creating pasteboard: com.apple.pasteboard.clipboard [-4960]
PasteBoard: Error creating pasteboard: com.apple.pasteboard.find [-4960]
2017-07-18 15:46:52,278 - imperialism_remake.server.server - INFO - created a multiprocess logger (pid=30384)
2017-07-18 15:46:52,290 - imperialism_remake.server.server - INFO - ServerManager started
Traceback (most recent call last):
File "/Users/Kristian/Documents/GitHub/imperialism-remake/source/imperialism_remake/server/server.py", line 134, in start
2017-07-18 15:46:52,394 - imperialism_remake.server.server - INFO - server starts (pid=30384)
self.server.start(constants.NETWORK_PORT)
File "/Users/Kristian/Documents/GitHub/imperialism-remake/source/imperialism_remake/lib/network.py", line 215, in start
2017-07-18 15:46:52,395 - imperialism_remake.lib.network - INFO - server listens on host=2 port=42932
raise RuntimeError('Network error: cannot listen')
RuntimeError: Network error: cannot listen
2017-07-18 15:46:53,044 - imperialism_remake.client.client - INFO - client initialized, start Qt app execution
2017-07-18 15:46:53,079 - imperialism_remake.client.client - INFO - client tries to connect to server
2017-07-18 15:46:53,079 - imperialism_remake.lib.network - INFO - client connecting to host=2 port=42932
2017-07-18 15:46:53,080 - imperialism_remake.lib.network - INFO - client successfully connected to host=2 port=42932
There's no mention of the mediaplayer (my Qt version is 5.9 on macOS), but the same error occurs. I think these are two different issues. (NB: The PasteBoard errors are a different problem, I think caused by the fact that I run most things inside of tmux
sessions.)
Since it claims to fail to listen on a port, but then makes a connection on the same port, my guess is that it is trying to listen on that port multiple times, and the second time finds the port is taken. I haven't looked at the source to confirm but it sounds like that kind of issue.
Also here, I was using apt-get
and not pip3
. Interesting to see that the error also occurs on macOS. First step should be to create a minimal, running example for the mediaplayer bug.
Regarding the network-cannot-listen-error and your idea that it tries to listen twice. That can easily be checked. Will do it right away.
Sorry, I meant to clarify this earlier: macOS isn't getting the mediaplayer bug. It is getting the Network error: cannot listen
error, but it is caused by the PasteBoard error that is particular to my system. I fixed that by reconfiguring my tmux
, but it's indicative of a higher level bug that any error in creating the server will throw a false error, but the client will connect successfully anyway.
After fixing tmux
, I no longer got this error on macOS, but it's worth investigating the Network error
anyway.
I'm getting this message on Ubuntu 16.04LTS with
pip3 install python3-pyqt5
andpip3 install python3-pyqt5.qtmultimedia
.Stacktrace:
I actually do not understand why there is a Network error following and then the client seems to connect successfully.