Skip to content

Fix: AttributeError: 'dict' object has no attribute 'dumps'#11

Open
rgcr wants to merge 1 commit intolunasoft:masterfrom
rgcr:Fix-issue_json
Open

Fix: AttributeError: 'dict' object has no attribute 'dumps'#11
rgcr wants to merge 1 commit intolunasoft:masterfrom
rgcr:Fix-issue_json

Conversation

@rgcr
Copy link
Copy Markdown

@rgcr rgcr commented Feb 9, 2023

Hay una confusion con el nombre de la variable y con el paquete, asi mismo el paquete json no esta importado.

Issue/IssueRequest.py:24, in IssueRequest.issue_json(url, token, json, version)
     21 @staticmethod
     22 def issue_json(url, token, json, version):
     23     if(isinstance(json, dict)):
---> 24         json = json.dumps(json)
     25     headers = {
     26         'Authorization': "bearer " + token,
     27         'Content-Type': "application/jsontoxml"
     28     }
     29     response = requests.request("POST", url + "/v3/cfdi33/issue/json/" + version, data = json.encode('utf-8'), headers = headers, verify = True, timeout = 300)

AttributeError: 'dict' object has no attribute 'dumps'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant