Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 Json.loads value type error #21

Open
iamfeysal opened this issue Feb 18, 2019 · 0 comments
Open

Python3 Json.loads value type error #21

iamfeysal opened this issue Feb 18, 2019 · 0 comments

Comments

@iamfeysal
Copy link

iamfeysal commented Feb 18, 2019

When i try to click the web.py file, it run successfully to display the index page , however, when i tried to click the allblocks url page it gives me an error saying saying:
json.loads(...) ValueError: Expecting value: line 1 column 1 (char 0)

** the code for part of the file bringing the error is**

@app.route('/allblocks') def mined_blocks(): """ Endpoint to list all mined blocks. """ with open('chain.txt', 'r') as jsonfile: data = json.loads(jsonfile) jsonfile.close() return render_template('blocks.html', data=data)

@iamfeysal iamfeysal reopened this Feb 18, 2019
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

No branches or pull requests

1 participant