Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnectionRefusedError: [WinError 10061] #10

Open
hello3932 opened this issue Mar 18, 2022 · 5 comments
Open

ConnectionRefusedError: [WinError 10061] #10

hello3932 opened this issue Mar 18, 2022 · 5 comments

Comments

@hello3932
Copy link

hello3932 commented Mar 18, 2022

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
@mmmmmm44
Copy link
Owner

mmmmmm44 commented Mar 19, 2022

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.
#7 (comment)
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

@hello3932
Copy link
Author

hello3932 commented Mar 19, 2022

@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

@mmmmmm44
Copy link
Owner

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.

@wwdok
Copy link

wwdok commented Jun 21, 2022

@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:

_2022_06_21_15_52_53_793.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

@potcham
Copy link

potcham commented Aug 11, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants