orcasgit / python-fitbit

Fitbit API Python Client Implementation
Other
623 stars 330 forks source link

wait_for_tstate_lock: ENGINE Waiting for thread Thread-4 #161

Open calambchops opened 3 years ago

calambchops commented 3 years ago

Hi,

On mac, my console is getting stuck at "ENGINE Waiting for thread Thread-4," and traceback shows it's stuck on tstate_lock which I'm not very familiar with. Running on my windows machine (python 3.8 installed) gives the same console output, but it will get stuck on "ENGINE Waiting for thread Thread-5," there's no traceback, and I'm unable to stop the program with keyboard interrupt.

I followed this tutorial: https://www.kdnuggets.com/2020/02/using-fitbit-web-api-python.html, and saw that someone commented having the same issue, but there's no resolution there yet. Any help would be appreciated.

[29/Nov/2020:11:07:57] ENGINE Listening for SIGTERM. [29/Nov/2020:11:07:57] ENGINE Listening for SIGHUP. [29/Nov/2020:11:07:57] ENGINE Listening for SIGUSR1. [29/Nov/2020:11:07:57] ENGINE Bus STARTING CherryPy Checker: The Application mounted at '' has an empty config.

[29/Nov/2020:11:07:57] ENGINE Started monitor thread 'Autoreloader'. [29/Nov/2020:11:07:57] ENGINE Serving on http://127.0.0.1:8080 [29/Nov/2020:11:07:57] ENGINE Bus STARTED 127.0.0.1 - - [29/Nov/2020:11:07:59] "GET /?code=66415ea7c5ae807821110a4a7a06b468ad20a958&state=t6NRK0zg1N6bsD1nQbbtV7ZOMEPfyd HTTP/1.1" 200 122 "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" [29/Nov/2020:11:08:00] ENGINE Bus STOPPING [29/Nov/2020:11:08:00] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('127.0.0.1', 8080)) shut down [29/Nov/2020:11:08:00] ENGINE Stopped thread 'Autoreloader'. [29/Nov/2020:11:08:00] ENGINE Bus STOPPED [29/Nov/2020:11:08:00] ENGINE Bus EXITING [29/Nov/2020:11:08:00] ENGINE Bus EXITED [29/Nov/2020:11:08:00] ENGINE Waiting for child threads to terminate... [29/Nov/2020:11:08:00] ENGINE Waiting for thread Thread-4. Traceback (most recent call last):

File "/Users/calvintrueman/Documents/fitbit_sleep_proj/FitbitSleepScraper.py", line 23, in server.browser_authorize()

File "/Users/calvintrueman/Documents/fitbit_sleep_proj/gather_keys_oauth2.py", line 56, in browser_authorize cherrypy.quickstart(self)

File "/Users/calvintrueman/opt/anaconda3/lib/python3.8/site-packages/cherrypy/init.py", line 178, in quickstart engine.block()

File "/Users/calvintrueman/opt/anaconda3/lib/python3.8/site-packages/cherrypy/process/wspbus.py", line 366, in block t.join()

File "/Users/calvintrueman/opt/anaconda3/lib/python3.8/threading.py", line 1011, in join self._wait_for_tstate_lock()

File "/Users/calvintrueman/opt/anaconda3/lib/python3.8/threading.py", line 1027, in _wait_for_tstate_lock elif lock.acquire(block, timeout):

KeyboardInterrupt