UltimaScraper
UltimaScraper copied to clipboard
Just a ?
Still getting "Too many files open" error
could you fix this by using a context manager which automatically calls pool.terminate, or create a pool outside the loop just once, and then send tasks to the processes inside?
pool = multiprocessing.Pool(nprocess) # initialise your pool for nprocess in process_per_cycle:
...
pool.map(cycle, offsets) # delegate work inside your loop
pool.close() # shut down the pool
forgive me if this dated or irrelevant, it's advice I found and am asking before trying myself
ended up reinstalling python and homebrew, havent seen the error in three cycles as of yet. so prob not necessary