HelloZeroNet / HelloZeroNet/ZeroNet

siteCmd command did not work

Open
#1,979 15 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
18.8k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

### Step 1: Please describe your environment

* ZeroNet version: 4053
* Operating system: Ubuntu 18.04
* Web browser: Vivaldi
* Tor status: not available
* Opened port: yes

### Step 2: Describe the problem:
```
bitcoren@name:~/ZeroNet-py3$ python3 zeronet.py siteCmd 1KoLHoz1nSddbuf6HbfP19F7Ht7xNBSa6m fileGet content.json
- Starting ZeroNet...
- Libsecpk256k1 loaded
- Version: 0.7.0 r4053, Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0], Gevent: 1.4.0
FileServer IPv6 not supported: [Errno 101] Network is unreachable
- Unhandled exception: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "zeronet.py", line 23, in main
main.start()
File "/home/bitcoren/ZeroNet-py3/src/main.py", line 515, in start
actions.call(config.action, action_kwargs)
File "/home/bitcoren/ZeroNet-py3/src/main.py", line 111, in call
back = func(**kwargs)
File "/home/bitcoren/ZeroNet-py3/src/main.py", line 333, in siteCmd
res = json.loads(ws.recv())
File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at src/main.py:333 in siteCmd and trace the ws.recv() response for the supplied command. Reproduce the command in the reported environment; done means siteCmd handles the response without JSONDecodeError and returns the requested file result.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.