Skip to content

TCP connnect can not connected, unity is runing #7

Open

Description

@lucasjinreal

INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Traceback (most recent call last):
File ".\main.py", line 239, in
main()
File ".\main.py", line 92, in main
socket = init_TCP()
File ".\main.py", line 37, in init_TCP
s.connect(address)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
[ WARN:0@4.732] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (539) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback

image

Activity

  1. mmmmmm44 commented on Mar 14, 2022

    @mmmmmm44
    Owner

    Is the TCP port in the unity program and the python program the same?

    Also, ensure that the TCP connection function is being called when running the program.

    Also, ensure that you run the unity program first before running the python program.

    I think mainly these are the reasons that caused the error.

  2. Bruce-yu199 commented on Mar 14, 2022

    @Bruce-yu199

    I had the same problem with you,and I solved it.
    I only modified the ip address in the main.py file at first, and then the same situation as you occurred. Later, I found that there is also an ip address in the HiyoriController.cs file. The result is that I changed the ip address in the HiyoriController.cs file. After successfully running! As shown in the picture, I hope this will help you!

  3. lucasjinreal commented on Mar 14, 2022

    @lucasjinreal
    Author

    @mmmmmm44 I am using the default port without changing, it should be same.

  4. lucasjinreal commented on Mar 14, 2022

    @lucasjinreal
    Author

    @Bruce-yu199 I don't understand, doesn't they all using 127.0.01? it was local TCP IP

  5. Bruce-yu199 commented on Mar 14, 2022

    @Bruce-yu199

    @jinfagang no, I mean every computer's local TCP IP may be different. you should find your own ip and modify the ip in both .py and .cs file with your own ip. for example, i modify the ip with my computer's ip"192.168.xxx.xxx"

  6. lucasjinreal commented on Mar 14, 2022

    @lucasjinreal
    Author

    @Bruce-yu199 I can 1000% sure that your problem wasn't solved by changing IP address.... 127.0.0.1 is just your local IP, it was same thing...

  7. Bruce-yu199 commented on Mar 14, 2022

    @Bruce-yu199

    @jinfagang sorry, I just reacted suddenly ,you are right. But I truly solve it by changing the ip with "192.168.xxx", maybe you can have a try or see if the port is occupied by another application ...

  8. lucasjinreal commented on Mar 14, 2022

    @lucasjinreal
    Author

    @Bruce-yu199 I fonud it was due to c# scripts acutally not fully up:

    imag

    @mmmmmm44 Can u give me a hand? I droped the cs to unitychan obejct already..
    and it can be seen here:

    image

    why give me this error?
  9. mmmmmm44 commented on Mar 19, 2022

    @mmmmmm44
    Owner

    Late reply, but I think you may have already figured it out.

    The usage of UI stuff (the Canvas and remaining stuff) is only available and can be figured them out only when you import the sample package downloaded from the dropbox.

    There is an App Controller object holding the UI System.cs, which controls the max/min value of the detection from Python and clip them.

    There is also an Cavas object which holds the UI stuff (the buttons and sliders).

    I don't include them in the tutorial videos as they are unfinished stuff to me (although they work), and also they are developed after I make the complete series.

    Anyway, thank you for using my project. Hope you are having fun. ><

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions