dvf / dvf/blockchain-book

Error in server.py

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
254
Forks
80
PR merge metrics
No merged PRs in 30d

Description

When starting the node and loading the interface it shows this error.

Task exception was never retrieved
future: exception=JSONDecodeError('Expecting value: line 1 column 1 (char 0)')>
Traceback (most recent call last):
File "C:\Users\de56002\Py\Proyectos\Block\server.py", line 40, in handle_connection
message = BaseSchema().loads(decoded_data) # <5>
File "C:\Users\de56002\Py\lib\site-packages\marshmallow\schema.py", line 756, in loads
data = self.opts.render_module.loads(json_data, **kwargs)
File "C:\Users\de56002\Py\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\de56002\Py\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\de56002\Py\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

As far as I could tell, it is receiving a String instead of being in JSON format.
Any way to fix it?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in server.py, especially handle_connection around line 40 where decoded_data is passed to BaseSchema().loads. Reproduce the node startup and interface-loading sequence, then inspect whether the received value is valid JSON before deciding what behavior should be considered done.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.