Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

There appear to be 6 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d

I'm trying a test connection on my Firebase Realtime database via python 3.8. I have two scripts, one is wdata (write data) and the other one is rdata (read data). The wdata.py is:

from firebase import firebase
firebase = firebase.FirebaseApplication("https://test-282f7.firebaseio.com/", None)
datos={
        'id':'99',
        'primer_sensor':'1111',
        'segundo_sensor':'512'
        } 
resultado=firebase.post('/tutorial_firebase/datos_post', datos)
read = firebase.get('/tutorial_firebase/datos_post', datos)

This script returns the same error but it inserts "datos" values in firebase.

The rdata.py is:

from firebase import firebase 
firebase = firebase.FirebaseApplication("https://test- 282f7.firebaseio.com/", None) 
lectura = firebase.get('/tutorial_firebase/datos_post', datos_post) 
print (lectura)

And this code also returns an error. The error is:

/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 6 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

Please can anyone tell me where is the error and how can I fix it?

p.s.:

My python compiler is: Python 3.8.2. (with 3.7 I install firebase but it returns "ModuleNotFoundError") I'm on macOS Catalina 10.15.7 Tried to compile in VS Code and MacVIM but the result is the same.

Thank you advance!

like image 782
Vazzattacc Avatar asked Oct 24 '20 16:10

Vazzattacc


2 Answers

I had the same problem as you when doing deep learning and the problem came from that I was loading too much data in memory. Be sure you don't try to load more data in your RAM than it's capacity.

like image 68
Yann POURCENOUX Avatar answered Sep 21 '22 09:09

Yann POURCENOUX


If this problem has occurred in training (deep learning), it's because of ram capacity. Use a smaller value for -batch parameter.

like image 22
Ehsan Akbari Tabar Avatar answered Sep 21 '22 09:09

Ehsan Akbari Tabar