question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

multiprocessing __del__ exception

See original GitHub issue

Hi everyone,

I’m having below issue with CCXT and Multiprocessing in python

launched multiple processes each managing one Binance instance (different api keys)

Everything runs fine but bellow error keeps on popping up in the console

Exception ignored in: <bound method Exchange.__del__ of ccxt.binance()>
Traceback (most recent call last):
  File "C:\Users\\Miniconda3\lib\site-packages\ccxt\base\exchange.py", line 401, in __del__
  File "C:\Users\\Miniconda3\lib\site-packages\requests\sessions.py", line 735, in close
  File "C:\Users\\Miniconda3\lib\site-packages\requests\adapters.py", line 325, in close
  File "C:\Users\\Miniconda3\lib\site-packages\urllib3\poolmanager.py", line 217, in clear
  File "C:\Users\\Miniconda3\lib\site-packages\urllib3\_collections.py", line 99, in clear
  File "C:\Users\\Miniconda3\lib\site-packages\urllib3\poolmanager.py", line 168, in <lambda>
  File "C:\Users\\Miniconda3\lib\site-packages\urllib3\connectionpool.py", line 471, in close
  File "C:\Users\\Miniconda3\lib\queue.py", line 175, in get
  File "C:\Users\\Miniconda3\lib\threading.py", line 347, in notify
TypeError: 'NoneType' object is not callable
Exception ignored in: <bound method Exchange.__del__ of ccxt.binance()>
Traceback (most recent call last):
  File "C:\Users\\Miniconda3\lib\site-packages\ccxt\base\exchange.py", line 401, in __del__
  File "C:\Users\\Miniconda3\lib\site-packages\requests\sessions.py", line 735, in close
  File "C:\Users\\Miniconda3\lib\site-packages\requests\adapters.py", line 325, in close
  File "C:\Users\\Miniconda3\lib\site-packages\urllib3\poolmanager.py", line 217, in clear
  File "C:\Users\\Miniconda3\lib\site-packages\urllib3\_collections.py", line 99, in clear
  File "C:\Users\\Miniconda3\lib\site-packages\urllib3\poolmanager.py", line 168, in <lambda>
  File "C:\Users\\Miniconda3\lib\site-packages\urllib3\connectionpool.py", line 471, in close
  File "C:\Users\\Miniconda3\lib\queue.py", line 175, in get
  File "C:\Users\\Miniconda3\lib\threading.py", line 347, in notify
TypeError: 'NoneType' object is not callable

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mattou78400commented, Jan 25, 2021

Hi,

I’m trying to get a minimum piece of code to replicate the issue, unfortunately I can’t easily.

The try/catch does the trick for now

I’ll update when I have the bug MVP

thanks!

0reactions
kroitorcommented, Jan 30, 2021

@mattou78400 i’d close this for now, feel free to reopen it if anything.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exception Handling in Methods of the Multiprocessing Pool ...
In this article, I would like to talk about some interesting and important things to consider when working with the multiprocessing Pool class...
Read more >
Multiprocessing Pool Exception Handling in Python
In this tutorial you will discover how to handle exceptions in a Python multiprocessing pool. Let's get started. Table of Contents.
Read more >
python - Exception thrown in multiprocessing Pool not detected
Exception thrown in multiprocessing Pool not detected · 1. I had the same problem. The cause is as follows: the worker process catches...
Read more >
multiprocessing — Process-based parallelism — Python 3.11 ...
If timeout is a positive number, it blocks at most timeout seconds and raises the queue.Empty exception if no item was available within...
Read more >
Unclean multiprocessing.Pool teardown on Python 3.8 #5806
The problem: remains if I explicitly state x.compute(scheduler='threading'); disappears if I state x.compute(scheduler='sync'); disappears if I ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found