Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
65 views
in Technique[技术] by (71.8m points)

python - Why does my script kill my website when reading a json file?

A bit of a funny one: I have a Fasthosts website and I try to read a json file from my PC with an extremely simple python script. If I execute the script a few times, it kills the website for a few minutes. Any idea where the problem comes from? (Fasthosts claim it has nothing to do with them)

Python Script:

JSON_PATH="http://blabla.co.uk/xxx/toto_db1.json"
json_local = urllib2.urlopen(JSON_PATH).read()
parsed_json = json.loads(json_local)

all_dates = []
for data in parsed_json:
        all_dates.append(data["form_date"])

print all_dates[0]

Thanks. Regards. Ju.

question from:https://stackoverflow.com/questions/65863446/why-does-my-script-kill-my-website-when-reading-a-json-file

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...