1

All of the following cases were performed normally.

  • home PC + python code
  • home PC + pyinstaller .exe
  • company's internal network PC + python code

"[Errono 11003] getaddrinfo failed" occurs only when running the pyinstaller .exec file on the company's internal network PC.

The same error occurs even when running the pyinstaller .exe file created on the home PC on the company's internal network PC.

the code is very simple

import socket

socket.getaddrinfo( 'localhost', 3306 )

The error message is as below.

socket.gaierror: [Errono 11003] getaddrinfo failed
[37152] Failed to execute script 'test00' due to unhandled exception!

The execution environment is the same both at home and at work.

  • OS : Windows10
  • Python : 3.8

Please tell me what is the cause.

imsimsi
  • 17
  • 4
  • Don't know if this is your problem, but Win10 will not correctly resolve the `localhost` IP address if it does not have a network connection. You can try to get around this by using the IP address `127.0.0.1` instead. – bfris Mar 01 '22 at 18:41

0 Answers0