Ошибка отступа Python при попытке реализовать QMEAN - PullRequest
0 голосов
/ 18 октября 2018
import json
import requests
url = "https://swissmodel.expasy.org/qmean/submit/"
# To upload from URL, put the URL as the structure
response = requests.post(url=url, data={"structure": 
"https://files.rcsb.org/download/1CRN.pdb", "email": "your@email.com"})

# When using Python requests - to upload from file, put the file in files
response = requests.post(url=url, data={"email": "your@email.com"}, files= 
{"structure": open('my_structure.pdb','r')}) 
print json.dumps(response.json(), indent=4, sort_keys=True)
{
"download_url": "https://swissmodel.expasy.org/qmean/qH7VxZ.json",
"error": "",
"meta": {
    "created": "2016-08-31 10:26:13.128564",
    "email": "your@email.com",
    "project_name": "Project",
    "results_page": "https://swissmodel.expasy.org/qmean/project/qH7VxZ/",
    "seqres_uploaded": false
},
"method": "QMEANDisCo",
"models": [
    {
        "modelid": "model_001",
        "name": "1CRN.pdb",
        "seqres": [
            {
                "atomseq": "TTCCPSIVARSNFNVCRLPGTPEAICATYTGCIIIPGATCPGDYAN",
                "chain_name": "A",
                "name": "seq_chain_0",
                "sequence": "TTCCPSIVARSNFNVCRLPGTPEAICATYTGCIIIPGATCPGDYAN"
            }
        ]
    }

Я получаю сообщение об ошибке:

print json.dumps (response.json (), отступ = 4, sort_keys = True) IndentationError: неожиданный отступ

На самом деле это простая ошибка отступа, как мне ее исправить?

...