HelloZeroNet / HelloZeroNet/ZeroNet

should zeronet.conf need to have all the configuration as shared in the example ?

Đang mở
#1,271 10 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
18.8k
Fork
2.3k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start with zeronet.py and src/main.py, especially the startup path shown in the traceback, and reproduce the failure using a zeronet.conf containing [global] log_dir = ~/log/. Check the FAQ configuration example and the reported default-handling concern; done means ZeroNet starts with that configuration and uses the requested log directory without the secondary Config error.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
cli
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.