Closed pvincent4 closed 4 years ago
en fait je me demande si ca ne vient pas du format du tag. En fait j'avais testé la partie local:artist et ca marchait à priori.
Voici le contenu de mon tag : tag_type : local:artist data : local:artist:md5:86f2f3678a1bab13b7ce4f18d4498a9e
Je vais quand même rajouter une vérification pour éviter le crash si le champ data ne comprend pas 3 parties séparées par :
Tag : TAG UID : 044442D2204B81 | TYPE : local:artist | MEDIA : Arthur H | READ COUNT : 887 Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/home/pi/.local/lib/python3.7/site-packages/smartcard/CardMonitoring.py", line 180, in run (addedcards, removedcards)) File "/home/pi/.local/lib/python3.7/site-packages/smartcard/Observer.py", line 62, in notifyObservers observer.update(self, arg) File "/home/pi/o2m/src/nfcreader.py", line 63, in update self.events.on_change(addedcards, removedcards, self.active_cards) # Launch the event File "/home/pi/.local/lib/python3.7/site-packages/events/events.py", line 95, in call f(*a, **kw) File "/home/pi/o2m/src/nfcreader.py", line 172, in update_change self.o2m.get_new_cards(addedCards, removedCards, activeCards) File "main.py", line 77, in get_new_cards self.one_tag_changed(tag) File "main.py", line 181, in one_tag_changed if media_parts[1] == 'recommendation': IndexError: list index out of range