HelloZeroNet / HelloZeroNet/ZeroNet

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

Aperta
#1,271 10 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
18.8k
Fork
2.3k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.