V
V
Vladislav Vozian2019-01-06 18:08:09
Python
Vladislav Vozian, 2019-01-06 18:08:09

How to fix error with json library on heroku?

import json
json_string = """ { "name":"John", "age":30, "car":null } """
parsed_string = json.loads(json_string)

This code throws an error
AttributeError: module 'json' has no attribute 'loads'

The whole interest of the question is why this code works fine on the local computer, but when uploaded to the server, it starts to give errors? And how to fix it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question