-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Erro ao tentar gerar DANFE #14
Comments
Oi Marcilene, Obrigado, |
Oi Marcilene, |
Oi Marcilene,
Ao tentar gerar o DANFE me surgiu a seguinte mensagem:
Traceback (most recent call last):
File "./gerar_danfe.py", line 28, in
resp = instancia.gerar_danfe(xml,'',emitente,'','kyan',vertical,versao)
File "/usr/lib/python2.7/site-packages/python_nfe-3.8-py2.7.egg/nfe/nf_e.py", line 321, in gerar_danfe
resp = resp.getElementsByTagName("protNFe")[0]
IndexError: list index out of range
Fiz da seguinte forma:
!/usr/bin/env python
from nfe.nf_e import *
instancia = nf_e()
Extraindo certificado
certificado = instancia.extrair_certificado_a1("clovis_2015.pfx","xxxxxxxxxx")
emitente = certificado['emissor']
cert = certificado['cert']
key = certificado['key']
versao = "3.10"
vertical = False
xml = file('nfe.xml','rb').read()
resp = instancia.gerar_danfe(xml,'',emitente,'','kyan',vertical,versao)
print resp
The text was updated successfully, but these errors were encountered: