CONSULTAR NFE E TRAZER SE ESTA CANCELADA

70 views
Skip to first unread message

Kauã Silva

unread,
Aug 24, 2023, 4:42:06 PM8/24/23
to PyNFe
Estou tentando fazer uma consulta mas esta retornando ("
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body> <nfeResultMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NFeConsultaProtocolo4"> <retConsSitNFe versao="4.00" xmlns="http://www.portalfiscal.inf.br/nfe"> <tpAmb>2</tpAmb><verAplic>SVAN_1.0.5</verAplic> <cStat>410</cStat> <xMotivo>Rejeicao: UF informada no campo cUF nao e atendida pelo Web Service</xMotivo><cUF>43</cUF> <dhRecbto>2023-08-24T17:38:19-03:00</dhRecbto> <chNFe>43230622301988000595550030004935821027718313</chNFe> </retConsSitNFe></nfeResultMsg></soap:Body></soap:Envelope>
")

Alguem poderia ajudar?

from pynfe.processamento.comunicacao import ComunicacaoSefaz

certificado = "certifcado.pfx"
senha = "123"
uf = "rs"
homologacao = True

con = ComunicacaoSefaz(uf, certificado, senha, homologacao)

xml = con.consulta_nota(
    modelo="nfe",
    chave="43230622301988000595550030004935821027718313",
    contingencia=True,
)

print(xml.text)
Reply all
Reply to author
Forward
0 new messages