HelloZeroNet / HelloZeroNet/ZeroNet
should zeronet.conf need to have all the configuration as shared in the example ?
- 主要语言
- JavaScript
- 星标
- 18.8k
- 派生
- 2.3k
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Step 1: Please describe your environment
* ZeroNet version: 0.6.1 r3234
* Operating system: Debian buster
* Web browser: 52.6.0
* Tor status: always
* Opened port: no
* Special configuration: in /etc/tor
```
ControlPort 9051
CookieAuthentication 1
```
from https://zeronet.readthedocs.io/en/latest/faq/#how-to-make-zeronet-work-with-tor-under-linux
### Step 2: Describe the problem:
I just want to have the log directory in a separate directory not anything else.
See https://zeronet.readthedocs.io/en/latest/faq/#is-it-possible-to-use-a-configuration-file
I want/ed to do -
You can put your configuration options to a zeronet.conf file. Example:
```
[global]
log_dir = ~/log/
```
I get the following error message -
```
- Starting ZeroNet...
ERROR:root:Unhandled exception: [Errno 2] No such file or directory: '~/log/'
Traceback (most recent call last):
File "zeronet.py", line 18, in main
import main
File "/home/shirish/games/ZeroNet-master/src/main.py", line 32, in
os.mkdir(config.log_dir)
OSError: [Errno 2] No such file or directory: '~/log/'
Traceback (most recent call last):
File "zeronet.py", line 91, in
main()
File "zeronet.py", line 64, in main
traceback.print_exc(file=open(config.log_dir + "/error.log", "a"))
AttributeError: 'Config' object has no attribute 'log_dir'
```
This is when I have made -
```
/home/shirish/games/ZeroNet-master> ls -l | grep log
drwxr-xr-x 2 shirish shirish 4096 Jan 31 12:58 log
```
I have tried it both with zeronet-stable 0.6.1 and zeronet-master and got the same error message.
I am happy with all the other defaults hence don't want to change anything and don't even know why I need to change the other options such as data-dir and UI-restrict bits. There is simply no explanation of what those options do.
* What did you expect to happen?
I expected it to run without issues as I have given the path. I actually expected to make the log directory when it was not there but didn't and had to create it manually.
I did read https://github.com/HelloZeroNet/ZeroNet/issues/1192 to see if I could get more input or understanding but didn't.
At the end had to remove zeronet.conf to access zeronet.py via python otherwise it was not happening.
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 zeronet.py 和 src/main.py 开始,特别关注 traceback 中显示的启动路径,并使用包含 [global] log_dir = ~/log/ 的 zeronet.conf 重现该故障。检查 FAQ 中的配置示例以及报告中关于默认值处理的担忧;当 ZeroNet 能够使用该配置启动,并在不出现次级 Config 错误的情况下使用所请求的日志目录时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100