pptk icon indicating copy to clipboard operation
pptk copied to clipboard

ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

Open RoyAmoyal opened this issue 2 years ago • 1 comments

Hey, I am trying to use


v = pptk.viewer(points)

for i in range (100):
    points = updates_points(points)
    v.clear()
    v.load(points)
...

but I am getting the next error ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it.

I already disabled my firewall but it doesn't help.

I installed the package with pip install on anaconda env.

what can I do?

RoyAmoyal avatar Dec 27 '22 19:12 RoyAmoyal

This is definitely no longer supported, hence no updates in 4 years. This seems to be an issue with the socket communication getting locked up somewhere. This seems to be independent of the number of points or size of data, it seems to happen after about 25 loads, but goes down to 14 if you have a wait() step as well. For me the following will print to 25 every time before the viewer hangs:

import pptk
import numpy as np

points = np.zeros((1,3),np.float32)
v = pptk.viewer(points)

for i in range(50):
    print(i)
    v.clear()
    v.load(points)

You could try spawning a new instance every 10-20 loads, and use v.close() to clean up the previous one...

SuaveFool avatar Jan 12 '23 04:01 SuaveFool