com.sun.star.uno.RuntimeException: Couldn't convert SONY RC-S380/P on usb:003:008 to a UNO type; caught exception: <class 'AttributeError'>: 'ContactlessFrontend' object has no attribute 'getTypes', traceback followsno traceback available...
# -*- coding: utf-8 -*-# LibreOffice 用マクロimport unodef GetCardData( ):import nfcfrom nfc.clf import RemoteTargetdoc = XSCRIPTCONTEXT.getDocument()sheet = doc.getSheets().getByName('sheet1')clf = nfc.ContactlessFrontend('usb')cell = sheet.getCellRangeByName('A1')cell.String = str(clf)tag = clf.connect(rdwr={'on-connect': lambda tag: False})cell = sheet.getCellRangeByName('A2')cell.String = str(tag)