python-binance icon indicating copy to clipboard operation
python-binance copied to clipboard

nw_path_close_fd Failed to close guarded necp fd 6 [9: Bad file descriptor]

Open ArneVanham opened this issue 7 years ago • 3 comments

First of all apologies for this noob question but I am just starting to play around with Python.

When I run the code below I always get an error message:

2019-01-13 13:07:28.461945+0100 Python[2246:76361] nw_path_close_fd Failed to close guarded necp fd 6 [9: Bad file descriptor]

Here is the whole output:

image

If I comment the sentence: client = Client("", "") or t = mp.Process(target=hello, args=(i,)) I don't get this error anymore. I don't understand why that is because those processes are not really linked to each other.

import multiprocessing as mp import time import random from binance.client import Client

base_currency = "BNB" client = Client("", "")

def runProcess(): print("runprocess") processes = [ ] for i in range(2): print("mp") t = mp.Process(target=hello, args=(i,)) processes.append(t) t.start()

def hello(n): print("call hello") time.sleep(random.randint(1,3)) print("[{0}] Hello!".format(n))

if name == 'main': print("main") runProcess()

ArneVanham avatar Jan 13 '19 12:01 ArneVanham

Please check my comment on StackOverflow. I can run this with no errors, and it's not related to python-binance at all.

anson-vandoren avatar Jan 13 '19 17:01 anson-vandoren

I have macOS. Looks I only experience this issue with Xcode. not with SublimeTEXT

ArneVanham avatar Jan 13 '19 18:01 ArneVanham

Hi there. I'm having this error ("nw_path_close_fd Failed to close guarded necp fd 14") in another context. It's a python daemon (build with py2app), that connects to a MAC OS X app, through a socket. Does anyone have an idea why this is happennig? Thank you in advance.

@anson-vandoren, can you share the link of your stackoverflow response? Thank you

nffdiogosilva avatar Jun 19 '19 09:06 nffdiogosilva