VTuber-Python-Unity icon indicating copy to clipboard operation
VTuber-Python-Unity copied to clipboard

ConnectionRefusedError: [WinError 10061]

Open hello3932 opened this issue 2 years ago • 5 comments

Traceback (most recent call last):

image

ConnectionRefusedError: [WinError 10061] Connection failed because the target computer refused to connect.

I copied it while watching your YouTube video, and it's the result of running unity program first. Can anyone tell me what the problem is? Do I have to change the port number?

  1. There's an error like this in unity. Is it okay to ignore it? It's a package downloaded from Dropbox, but it's still like this..... image

hello3932 avatar Mar 18 '22 20:03 hello3932

Regarding first error: It should work fine, as the address "127.0.0.1" is the local host, which is your computer. If it does not work, maybe it's about the firewall of unity and python application? Try disable firewall to both of them and retry. Ensure the port numbers are the same (Since they are the same, so I think that is not the problem)

[EDIT] If still not working, you may check this reply out. https://github.com/mmmmmm44/VTuber-Python-Unity/issues/7#issuecomment-1066536611 Though I have no idea why changing this can solve the connection program.

Second error: I downloaded the package from dropbox and import it to a new project. There should be no such error. If it happens, click on the Ref_SMR_EYE_DEF and REF_SMR_EL_DEF variable in the auto blink script provided, and unity should locate the components in the Hierarchy. Dragging the corresponding component to the variables should solve the problem.

image

mmmmmm44 avatar Mar 19 '22 07:03 mmmmmm44

@mmmmmm44 First of all, thank you very much for your reply. I want to do it, but it's really sad.

The first error. I'm using the unitychan3d file. Can I just change the port numbers on main.py and unitychancontroller.cs? (In the comment that you told me to refer to, I'm asking because he changed the hiyoricontroller.cs port number!)

Second error. If I do it, it comes out as follows. Can I ignore the following two errors? image

hello3932 avatar Mar 19 '22 08:03 hello3932

Comment Line 66 and 67 and try to run the program again

I think this also solves your TCP problem as maybe the Unity script will stop running once facing an error.

mmmmmm44 avatar Mar 19 '22 09:03 mmmmmm44

@mmmmmm44 Hi, i watched your video(https://www.youtube.com/watch?v=V6Wd2kPNbPY), but i am new to Unity, so i still meet some problems, please check the screen record:

https://user-images.githubusercontent.com/43233772/174746941-2959ee99-c55d-4980-978f-6fbd8231237f.mp4

  1. after i hit start button, the character disappears, from the position Y, it seems keep going down
  2. how to switch on TCP server, my python can not connect to Unity. You said click setting button, but where is the setting button, i can not find it ...😶 image

wwdok avatar Jun 21 '22 07:06 wwdok

Hi guys, I experienced some issues regarding TCP connection. I got this in Unity console. image

and this when i run python main.py --connect INFO: Created TensorFlow Lite XNNPACK delegate for CPU. Connected to address: 192.168.X.X error while sending :: [Errno 32] Broken pipe

By the way, I changed s.connect(address) -> s.bind(address) because I got this: INFO: Created TensorFlow Lite XNNPACK delegate for CPU. Error while connecting :: [Errno 111] Connection refused

potcham avatar Aug 11 '22 20:08 potcham