Prerequisites
bert-as-service?README.md?README.md?I'm using this command to start the server:
python bert-serving-start -model_dir=../../pre-trained-model/
Then this issue shows up:

I had the same issue (Win 10). What fixed it for me was to comment out two lines of logger code in the /server/graph.py file.
logger.info("freezing %d variables...", len(returned_variables))
logger.info("Converted %d variables to const ops.", how_many_converted)
Could you do bert-serving-start -version and tell me your version? as I already solved the logger issue on Windows in #183 and shouldn't be any problem since 1.7.0.
Please do pip install -U bert-serving-server bert-serving-client and upgrade to the latest version and retry.
My version is 1.7.5
@davidlenz it works! thx!
I'm reopening this as a bug.
I also have the same issue,
-cpu flagbert-serving-start -version gives: 1.7.4, upgraded now to 1.7.5 but the result is the same.UPDATE: @davidlenz solution seems to work (tested with GPU)
Somehow my logger mysteriously fails on Windows for this particular part. I did a quick fix, could you please give a try on 1.7.6 using pip install -U?
@hanxiao, thanks for the update. Unfortunately I get the same error with 1.7.6, and it is again fixed by commenting out the logger lines 194 and 248 in graph.py.
🤦♂️
Instead of bumping versions, I'd keep it as it is for now. In the next version, I will remove logger in graph.py for better compatibility on Windows. For all windows users, if you encounter such problem, please refer to the quick fix as https://github.com/hanxiao/bert-as-service/issues/207#issuecomment-455890549 suggested. Meanwhile stay tuned.
I also got this problem. My version is 1.7.6, os is win7 .
fyi, this is fixed in #212, the new feature is available since 1.7.7. Please do
pip install -U bert-serving-server bert-serving-client
for the update.
I encountered this problem again in version 1.8.0.