barrycarey / Plex-Data-Collector-For-InfluxDB

Collects data about your Plex server and sends it to InfluxDB
165 stars 41 forks source link

RuntimeError: dictionary changed size during iteration #9

Closed MrMoof closed 7 years ago

MrMoof commented 7 years ago

Started using this but whenever the number of current streams changes I get the following error:

@plex:~/Plex-Data-Collector-For-InfluxDB-master$ sudo python3 plexInfluxdbCollector.py Loading Configuration File config.ini INFO: Found 0 Bad Server(s). Removing Them From List Configuration Successfully Loaded Traceback (most recent call last): File "plexInfluxdbCollector.py", line 606, in main() File "plexInfluxdbCollector.py", line 602, in main collector.run() File "plexInfluxdbCollector.py", line 480, in run self.get_active_streams() File "plexInfluxdbCollector.py", line 203, in get_active_streams self._process_active_streams(active_streams) File "plexInfluxdbCollector.py", line 353, in _process_active_streams self._remove_dead_streams(session_ids) File "plexInfluxdbCollector.py", line 362, in _remove_dead_streams for id, data in self.active_streams.items(): RuntimeError: dictionary changed size during iteration

barrycarey commented 7 years ago

I'll push a fix for this when I get out of work tonight

barrycarey commented 7 years ago

Should be fixed now.