bra...@gmail.com
unread,Oct 22, 2025, 4:33:44 PM (2 days ago) Oct 22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to PyAfipWs Factura Electrónica Libre y temas relacionados AFIP ARBA ANMAT
Hay un issue está en el script rece1.py de pyafipws en la línea 812. Cuando AFIP retorna error 602 (comprobante no existe), el objeto ws.factura es None, y el código intenta hacer .copy() sobre None
602: No existen datos en nuestros registros para los parametros ingresados.
Excepcion: b"'NoneType' object has no attribute 'copy'"
Traceback (most recent call last):
File "/opt/pyafipws/rece1.py", line 812, in main
factura = ws.factura.copy()
AttributeError: 'NoneType' object has no attribute 'copy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/pyafipws/rece1.py", line 995, in <module>
main()
File "/opt/pyafipws/rece1.py", line 984, in main
open("traceback.txt", "w").write("\n".join(ex))
y el traceback.txt tiene esto
{'filename': '/opt/pyafipws/pyfepdf.py', 'lineno': 1336, 'function_name': 'ProcesarPlantilla', 'code': "p = self.ivas_ds[int(it['iva_id'])]", 'msg': 'KeyError: 1\n', 'name': 'KeyError', 'tb': 'Traceback (most recent call last):\n File "/opt/pyafipws/pyfepdf.py", line 1336, in ProcesarPlantilla\n p = self.ivas_ds[int(it[\'iva_id\'])]\nKeyError: 1\n'}